Part Number Hot Search : 
152KR1 BAT54A V30100SG ACE1101B V30100SG AI3D9J 2N3906 IE0011
Product Description
Full Text Search
 

To Download FDC87W22 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  FDC87W22 power i/o controller features 5 volt operation floppy disk controller (fdc) - compatible with ibm pc/at disk drive systems - variable write pre-compensation with track selectable capability - dma enable logic - non-burst mode dma option - supports floppy disk drives and tape drives - detects all overrun and underrun conditions - data rate and drive control registers - built-in address mark detection circuit to simplify the read electronics - ibm pc system address decoder - supports up to two embedded hard disk drives (ide at bus) - single 24 mhz crystal input - fdd anti-virus functions with software write protect and fdd write enable signal, write data signal force inactive - supports up to four 3.5-inch or 5.25- inch floppy disk drives - completely compatible with industry standard 82077 - 360kbps/720k/1.2m/1.44m/2.88m format - 250kbps, 300kbps, 500kbps, 1 mbps data transfer rate - supports vertical recording format - 16-byte data fifos serial ports - two high-speed 16550 compatible uarts with 16-byte send/receive fifos - midi compatible - fully programmable serial-interface characteristics: - 5, 6, 7 or 8-bit characters - even, odd or no parity bit generation/detection - 1, 1.5 or 2 stop bits generation - internal diagnostic capabilities: - loop-back controls for communications link fault isolation - break, parity, overrun, framing error simulation - programmable baud generator allows division of 1.8461 mhz and 24 mhz by 1 to (2 16 -1) parallel port - compatible with ibm parallel port - supports parallel port with bidirectional lines - supports enhanced parallel port (epp) - compatible with ieee 1284 specification - supports extended capabilities port (ecp) - compatible with ieee 1284 specification - extension fdd mode supports disk drive b through parallel port - extension adapter mode supports pocket devices through parallel port
2 - extension 2fdd mode supports disk drives a and b through parallel port - joystick mode supports joystick through parallel port programmable configuration settings immediate or automatic power-down mode for power management isa host interface all hardware power-on settings have internal pull-up or pull-down resistors as default value configurable plug and play registers infrared communication port 100 pin qfp package general description the FDC87W22 integrates a disk drive adapter, serial port (uart), parallel port, ide bus interface, and game port decoder onto a single chip. the FDC87W22 also has additional powerful features such as configurable plug- and-play registers for the whole chip and infrared support in one of the serial ports. the disk drive adapter functions of the FDC87W22 include a floppy disk drive controller compatible with the industry standard 82077/765 data separator, write pre- compensation circuit, decode logic, data rate selection, clock generator, drive interface control logic, and interrupt and dma logic. the wide range of functions integrated into the FDC87W22 greatly reduces the number of components required for interfacing with floppy disk drives. the FDC87W22 supports four 360k, 720k, 1.2m, 1.44m, or 2.88m disk drives and data transfer rates of 250 kb/s, 300 kb/s, 500 kb/s, and 1 mb/s. the FDC87W22 provides two high-speed serial communication ports (uarts), one of which supports serial infrared communication. each uart includes a 16-byte send/receive fifo, a programmable baud rate generator, complete modem control capability, and a processor interrupt system. the FDC87W22 supports one pc-compatible printer port. additional bidirectional i/o capability is available by hardware control or software programming. the parallel port also supports the enhanced parallel port (epp) and extended capabilities port (ecp). the FDC87W22 supports two embedded hard disk drive (at bus) interfaces and a game port with decoded read/write output. the chip's extension fdd mode and extension 2fdd mode allow one or two external floppy disk drives to be connected to the computer through the printer interface pins in notebook computer applications. the extension adapter mode of the FDC87W22 allows pocket devices to be installed through the printer interface pins in notebook computer applications according to a protocol set by smsc, but with upgraded performance. the joystick mode allows a joystick to be connected to a parallel port with a signal switching cable. the configuration registers support mode selection, function enable/disable, and power down function selection. moreover, the configurable pnp registers are compatible with the plug-and-play feature in windows 95 tm , which makes system resource allocation more efficient than ever. standard microsystems is a registered trademark and smsc is a trademark of standard microsystems corporation. other product and company names are trademarks or registered trademarks of their respective holders.
3 table of contents features ................................ ................................ ................................ ................................ ....... 1 general description ................................ ................................ ................................ ................ 2 pin configuration ................................ ................................ ................................ ...................... 5 pin description ................................ ................................ ................................ .......................... 6 h ost i nterface ................................ ................................ ................................ .............................. 6 s erial p ort i nterface ................................ ................................ ................................ ................... 7 g ame p ort /p ower d own i nterface ................................ ................................ ............................... 9 m ulti -m ode p arallel p ort ................................ ................................ ................................ .......... 10 ide and fdc i nterface ................................ ................................ ................................ ............... 18 fdc functional description ................................ ................................ ................................ . 20 FDC87W22 fdc ................................ ................................ ................................ .......................... 20 at i nterface ................................ ................................ ................................ ............................... 20 fifo (d ata ) ................................ ................................ ................................ ................................ . 20 d ata s eparator ................................ ................................ ................................ .......................... 21 w rite p recompensation ................................ ................................ ................................ .............. 21 p erpendicular r ecording m ode ................................ ................................ ................................ .. 21 fdc c ore ................................ ................................ ................................ ................................ ... 22 fdc c ommands ................................ ................................ ................................ ............................ 23 r egister d escriptions ................................ ................................ ................................ ................. 32 s tatus r egister a (sa r egister ) (r ead base address + 0) ................................ .......................... 33 s tatus r egister b (sb r egister ) (r ead base address + 1) ................................ .......................... 35 d igital o utput r egister (do r egister ) (w rite base address + 2) ................................ ............... 37 t ape d rive r egister (td r egister ) (r ead base address + 3) ................................ ........................ 37 m ain s tatus r egister (ms r egister ) (r ead base address + 4) ................................ ..................... 38 d ata r ate r egister (dr r egister ) (w rite base address + 4) ................................ ...................... 39 fifo r egister (r/w base address + 5) ................................ ................................ ........................ 40 s tatus r egister 0 (st0) ................................ ................................ ................................ .............. 41 s tatus r egister 1 (st1) ................................ ................................ ................................ .............. 41 s tatus r egister 2 (st2) ................................ ................................ ................................ .............. 42 s tatus r egister 3 (st3) ................................ ................................ ................................ .............. 42 d igital i nput r egister (di r egister ) (r ead base address + 7) ................................ ...................... 42 c onfiguration c ontrol r egister (cc r egister ) (w rite base address + 7) ................................ . 44 ide ................................ ................................ ................................ ................................ .................. 45 ide d ecode d escription ................................ ................................ ................................ .............. 45 uart port ................................ ................................ ................................ ................................ ... 46 u niversal a synchronous r eceiver /t ransmitter (uart a, uart b) ................................ ............ 46 uart c ontrol r egister (ucr) (r ead /w rite ) ................................ ................................ ............. 49 uart s tatus r egister (usr) (r ead /w rite ) ................................ ................................ ................ 50
4 h andshake c ontrol r egister (hcr) (r ead /w rite ) ................................ ................................ ...... 51 h andshake s tatus r egister (hsr) (r ead /w rite ) ................................ ................................ ........ 52 uart fifo c ontrol r egister (ufr) (w rite only ) ................................ ................................ ..... 53 i nterrupt s tatus r egister (isr) (r ead only ) ................................ ................................ .............. 54 i nterrupt c ontrol r egister (icr) (r ead /w rite ) ................................ ................................ ........ 56 p rogrammable b aud g enerator (bll/bhl) (r ead /w rite ) ................................ ............................ 56 u ser -d efined r egister (udr) (r ead /w rite ) ................................ ................................ ................ 57 parallel port ................................ ................................ ................................ .......................... 58 p rinter i nterface l ogic ................................ ................................ ................................ .............. 58 e nhanced p arallel p ort (epp) ................................ ................................ ................................ ... 61 d ata s wapper ................................ ................................ ................................ ............................. 61 p rinter s tatus b uffer ................................ ................................ ................................ ................ 61 p rinter c ontrol l atch and p rinter c ontrol s wapper ................................ ............................... 62 epp a ddress p ort ................................ ................................ ................................ ...................... 63 epp d ata p ort 0-3 ................................ ................................ ................................ ...................... 63 epp o peration ................................ ................................ ................................ ............................ 65 e xtended c apabilities p arallel (ecp) p ort ................................ ................................ ................. 65 e xtension fdd m ode (extfdd) ................................ ................................ ................................ .. 74 e xtension 2fdd m ode (ext2fdd) ................................ ................................ .............................. 74 specifications ................................ ................................ ................................ .......................... 116 absolute maximum ratings ................................ ................................ ................................ . 116 dc characteristics ................................ ................................ ................................ ................ 116 ac characteristics ................................ ................................ ................................ ................ 118 timing waveforms ................................ ................................ ................................ .................. 124 application circuits ................................ ................................ ................................ .............. 136 package dimensions ................................ ................................ ................................ .............. 139 80 arkay drive hauppauge, ny 11788 (516) 435-6000 fax (516) 273-3123
5 pin configuration 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 nindex nstep ndsa ndsb nwe nwd nrwc nhead ndir gnd nidben irq_b nirqin ncs0 ncs1 irq_a tc ndack_b irq_f drq_b nmob nmoa ntrak0 nwp ndskchg a10 nrdata d7 d6 d5 d4 d3 d2 d1 d0 gnd niow nior aen a9 a8 a7 a6 a5 vdd a4 a3 a2 a1 a0 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 nrib ndcdb ndsrb nctsb ndtrb nrtsb irq_c soutb sinb ngmrd gnd ngmwr souta irq_d nrtsa ndtra nctsa ndsra ndcda nria 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 nreside ncs npdcin drq_c iochrdy mr xtal1 xtal2 pd0 pd1 pd2 pd3 pd4 pd5 vdd pd6 pd7 ndack_c nstb nafd ninit nslin irq_e busy gnd nack pe slct nerr sina FDC87W22
6 pin description i/o8t ttl level bidirectional pin with 8 ma source-sink capability i/o12t ttl level bidirectional pin with 12 ma source-sink capability i/o24t ttl level bidirectional pin with 24 ma source-sink capability out8t ttl level output pin with 8 ma source-sink capability out12t ttl level output pin with 12 ma source-sink capability od12 open-drain output pin with 12 ma sink capability od24 open-drain output pin with 24 ma sink capability int ttl level input pin inc cmos level input pin incs cmos level schmitt-triggered input pin note: refer to dc characteristics section for details. host interface symbol pin i/o function d0 - d7 66-73 i/o 24t system data bus bits 0-7 a0 - a9 51-55 57-61 in c system address bus bits 0-9 a10 75 in c in ecp mode, this pin is the a10 address input. iochrdy 5 od 24 in epp mode, this pin is the io channel ready output to extend the host read/write cycle. mr 6 in cs master reset. active high. mr is low during normal operations. ncs 2 in t active low chip select signal aen 62 in c system address bus enable nior 63 in cs cpu i/o read signal niow 64 in cs cpu i/o write signal drq_b 100 out 12t dma request signal b ndack_b 98 in c dma acknowledge signal b drq_c 4 out 12t dma request signal c ndack_c 18 in c dma acknowledge signal c tc 97 in c terminal count. when active, this pin indicates termination of a dma transfer. nirqin 93 in c interrupt request input irq_a/ gio1 96 out 12t i/o 12t when cr16 bit 4 (goiqsel) = 0: interrupt request signal a; when cr16 bit 4 (goiqsel) = 1: general purpose i/o port 1.
7 symbol pin i/o function irq_b/ gio0 92 out 12t i/o 12t when cr16 bit 4 (goiqsel) = 0: interrupt request signal b; when cr16 bit 4 (goiqsel) = 1: general purpose i/o port 0. irq_c 44 out 12t interrupt request signal c irq_d 37 out 12t interrupt request signal d irq_e 23 out 1 2t interrupt request signal e irq_f 99 out 12t interrupt request signal f xtal1 7 in c xtal oscillator input xtal2 8 out 8t xtal oscillator output serial port interface symbol pin i/o function nctsa nctsa 34 47 in t clear to send is the modem control input. the function of these pins can be tested by reading bit 4 of the handshake status register. ndsra ndsrb 33 48 in t data set ready. an active low indicates the modem or data set is ready to establish a communication link and transfer data to the uart. ndcda ndcdb 32 49 in t data carrier detect. an active low indicates the modem or data set has detected a data carrier. nria nrib 31 50 in t ring indicator. an active low indicates that a ring signal is being received by the modem or data set. sina sinb/irrx1 30 42 in t serial input. used to receive serial data from the communication link. souta/ piride 38 i/o 8t uart a serial output. used to transmit serial data out to the communication link. during power-on reset, this pin is pulled up internally and is defined as piride, which provides the power-on value for cr16 bit 1 (iride). a 47 k w is recommended when intends to pull down at power-on reset. soutb/ irtx1/ pgmdrq 43 i/o 8t uart b serial output. used to transmit serial data out to the communication link. during power-on reset, this pin is pulled up internally and is defined as pgmdrq, which provides the power-on value for cr16 bit 3 (gmdrq). a 47 k w is recommended when intends to pull down at power-on reset.
8 symbol pin i/o function ndtra phefras 35 i/o 8t uart a data terminal ready. an active low informs the modem or data set that the controller is ready to communicate. during power-on reset, this pin is pulled down internally and is defined as phefras, which provides the power-on value for cr16 bit 0 (hefras). a 47 k w is recommended when intends to pull up at power-on reset. ndtrb 46 o 8t uart b data terminal ready. an active low informs the modem or data set that controller is ready to communicate. nrtsa ppnpcvs 36 i/o 8t uart a request to send. an active low informs the modem or data set that the controller is ready to send data. during power-on reset, this pin is pulled up internally and is defined as ppnpcvs, which provides the power-on value for cr16 bit 2 (pnpcvs). a 47 k w is recommended when intends to pull down at power-on reset. nrtsb pgoiqsel 45 i/o 8t uart b request to send. an active low informs the modem or data set that the controller is ready to send data. during power-on reset, this pin is pulled down internally and is defined as pgoiqsel, which provides the power-on value for cr16 bit 4 (goiqsel). a 47 k w is recommended when intends to pull up at power-on reset.
9 game port/power down interface if bit 3 of cr16 (gmdrq) is 1, bit 4 of cr3 (gmods0) determines whether the game port is in adapter mode or portable mode (default is adapter mode). if bit 3 of cr16 is 0, pin 39 and 41 are used for dma a operation. symbol pin i/o function ngmrd pfdcen ndack_a 41 out 8t out 8t in t when cr16 bit 3 (gmdrq) = 1: adapter mode: game port read control signal. portable mode: when parallel port is selected as extension fdd/extension 2fdd mode, this pin will be active. the active state is dependent on bit 7 of cra (pfdcact), and default is low active. when cr16 bit 3 (gmdrq) = 0: dma acknowledge signal a. ngmwr pexten drq_a 39 out 8t out 8t out 8t when cr16 bit 3 (gmdrq) = 1: adapter mode: game port write control signal. portable mode: when a particular extended mode is selected for the parallel port, this pin will be active. the extended modes include extension adapter mode, epp mode, ecp mode, and ecp/epp mode, which are selected using bit 3 - bit 0 of cra. the active state is dependent on bit 6 of cra (pextact); the default is low active. when cr16 bit 3 (gmdrq) = 0: dma request signal a. pdcin 3 in c this input pin controls the chip power down. when this pin is active, the clock supply to the chip will be inhibited and the output pins will be tri-stated as defined in cr4 and cr6. the pdcin is pulled down internally. its active state is defined by bit 4 of cra (pdchact). default is high active.
10 multi-mode parallel port the following pins have eight functions, which are controlled by bits prtmod0, prtmod1, and prtmod2 of cr0 and cr9 (refer to the extended functions section). symbol pin i/o function busy 24 in t od 12 in t od 12 _ printer mode: busy an active high input indicates that the printer is not ready to receive data. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nmob2 this pin is for extension fdd b; the function of this pin is the same as that of the nmob pin. extension adapter mode: xirq this pin is an interrupt request generated by the extension adapter and is an active high input. extension 2fdd mode: nmob2 this pin is for extension fdd a and b; the function of this pin is the same as that of the nmob pin. joystick mode: nc pin. nack 26 in t od 12 in t od 12 _ printer mode: nack an active low input on this pin indicates that the printer has received data and is ready to accept more data. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: ndsb2 this pin is for the extension fdd b; its functions are the same as those of the ndsb pin. extension adapter mode: xdrq dma request generated by the extension adapter. an active high input. extension 2fdd mode: ndsb2 this pin is for extension fdd a and b; this function of this pin is the same as that of the ndsb pin. joystick mode: nc pin.
11 symbol pin i/o function pe 27 in t od 12 out 12t od 12 _ printer mode: pe an active high input on this pin indicates that the printer has detected the end of the paper. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nwd2 this pin is for extension fdd b; its function is the same as that of the nwd pin. extension adapter mode: xa0 this pin is system address a0 for the extension adapter. extension 2fdd mode: nwd2 this pin is for extension fdd a and b; this function of this pin is the same as that of the nwd pin. joystick mode: nc pin. slct 28 in t od 12 out 12t od 12 _ printer mode: slct an active high input on this pin indicates that the printer is selected. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nwe2 this pin is for extension fdd b; its functions are the same as those of the nwe pin. extension adapter mode: xa1 this pin is system address a1 for the extension adapter. extension 2fdd mode: nwe2 this pin is for extension fdd a and b; this function of this pin is the same as that of the nwe pin. joystick mode: nc pin.
12 symbol pin i/o function nerr 29 in t od 12 out 12t od 12 _ printer mode: nerr an active low input on this pin indicates that the printer has encountered an error condition. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nhead2 this pin is for extension fdd b; its function is the same as that of the nhead pin. extension adapter mode: xa2 this pin is system address a2 for the extension adapter. extension 2fdd mode: nhead2 this pin is for extension fdd a and b; its function is the same as that of the nhead pin. joystick mode: nc pin. nslin 22 od 12 od 12 out 12t od 12 out 12t printer mode: nslin output line for detection of printer selection. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nstep2 this pin is for extension fdd b; its function is the same as that of the nstep pin. extension adapter mode: xtc this pin is the dma terminal count for the extension adapter. the count is sent by tc directly. extension 2fdd mode: nstep2 this pin is for extension fdd a and b; its function is the same as that of the nstep pin . joystick mode: vdd for joystick.
13 symbol pin i/o function ninit 21 od 12 od 12 out 12t od 12 out 12t printer mode: ninit output line for the printer initialization. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: ndir2 this pin is for extension fdd b; its function is the same as that of the ndir pin. extension adapter mode: nxdack this pin is the dma acknowledge output for the extension adapter; the output is sent directly from npdackx. extension 2fdd mode: ndir2 this pin is for extension fdd a and b; its function is the same as that of the ndir pin. joystick mode: vdd for joystick. nafd 20 od 12 od 12 out 12t od 12 out 12t printer mode: nafd an active low output from this pin causes the printer to auto feed a line after a line is printed. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nrwc2 this pin is for extension fdd b; its function is the same as that of the nrwc pin. extension adapter mode: nxrd this pin is the i/o read command for the extension adapter. when the extension adapter base address is written to the extension adapter address register, nxrd and nxwr go low simultaneously so that the command register on the extension adapter can latch the same base address. extension 2fdd mode: nrwc2 this pin is for extension fdd a and b; its function is the same as that of the nrwc pin. joystick mode: vdd for joystick.
14 symbol pin i/o function nstb 19 od 12 - out 12t - out 12t printer mode: nstb an active low output is used to latch the parallel data into the printer. this pin is pulled high internally. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: this pin is a tri-state output. extension adapter mode: nxwr this pin is the i/o write command for the extension adapter. when the extension adapter base address is written to the extension adapter address register, nxrd and nxwr go low simultaneously so that the command register on the extension adapter can latch the same base address. extension 2fdd mode: this pin is a tri-state output. joystick mode: vdd for joystick. pd0 9 i/o 24t in t i/o 24t in t i/o 24t printer mode: pd0 parallel port data bus bit 0. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nindex2 this pin is for extension fdd b; the function of this pin is the same as that of the nindex pin. this pin is pulled high internally. extension adapter mode: xd0 this pin is system data bus d0 for the extension adapter. extension 2fdd mode: nindex2 this pin is for extension fdd a and b; this function of this pin is the same as nindex pin. this pin is pulled high internally. joystick mode: jp0 this pin is the paddle 0 input for joystick.
15 symbol pin i/o function pd1 10 i/o 24t in t i/o 24t in t i/o 24t printer mode: pd1 parallel port data bus bit 1. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: ntrak02 this pin is for extension fdd b; the function of this pin is the same as that of the ntrak0 pin. this pin is pulled high internally. extension adapter mode: xd1 this pin is system data bus d1 for the extension adapter. extension. 2fdd mode: ntrak02 this pin is for extension fdd a and b; this function of this pin is the same as ntrak0 pin. this pin is pulled high internally. joystick mode: jp1 this pin is the paddle 1 input for joystick. pd2 11 i/o 24t in t i/o 24t in t - printer mode: pd2 parallel port data bus bit 2. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nwp2 this pin is for extension fdd b; the function of this pin is the same as that of the nwp pin. this pin is pulled high internally. extension adapter mode: xd2 this pin is system data bus d2 for the extension adapter. extension. 2fdd mode: nwp2 this pin is for extension fdd a and b; this function of this pin is the same as that of the nwp pin. this pin is pulled high internally. joystick mode: nc pin
16 symbol pin i/o function pd3 12 i/o 24t in t i/o 24t in t - printer mode: pd3 parallel port data bus bit 3. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: nrdata2 motor on b for extension fdd b; the function of this pin is the same as that of the nrdata pin. this pin is pulled high internally. extension adapter mode: xd3 this pin is system data bus d3 for the extension adapter. extension 2fdd mode: nrdata2 this pin is for extension fdd a and b; this function of this pin is the same as that of the nrdata pin. this pin is pulled high internally. joystick mode: nc pin pd4 13 i/o 24t in t i/o 24t in t in t printer mode: pd4 parallel port data bus bit 4. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: ndshchg2 drive select b for extension fdd b; the function of this pin is the same as that of ndshchg pin. this pin is pulled high internally. extension adapter mode: xd4 this pin is system data bus d4 for the extension adapter. extension 2fdd mode: ndskchg2 this pin is for extension fdd a and b; this function of this pin is the same as that of the ndskchg pin. this pin is pulled high internally. joystick mode: jb0 this pin is the button 0 input for the joystick.
17 symbol pin i/o function pd5 14 i/o 24t - i/o 24t - in t printer mode: pd5 parallel port data bus bit 5. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: this pin is a tri-state output. extension adapter mode: xd5 this pin is system data bus d5 for the extension adapter extension 2fdd mode: this pin is a tri-state output. joystick mode: jb1 this pin is the button 1 input for the joystick. pd6 16 i/o 24t - i/o 24t od 24 - printer mode: pd6 parallel port data bus bit 6. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: this pin is a tri-state output. extension adapter mode: xd6 this pin is system data bus d6 for the extension adapter extension. 2fdd mode: nmoa2 this pin is for extension fdd a; its function is the same as that of the nmoa pin. joystick mode: nc pin pd7 17 i/o 24t - i/o 24t od 24 - printer mode: pd7 parallel port data bus bit 7. refer to the description of the parallel port for the definition of this pin in ecp and epp mode. extension fdd mode: this pin is a tri-state output. extension adapter mode: xd7 this pin is system data bus d7 for the extension adapter. extension 2fdd mode: ndsa2 this pin is for extension fdd a; its function is the same as that of the ndsa pin. joystick mode: nc pin
18 ide and fdc interface symbol pin i/o function nreside/ irq_g 1 out 12t out 12t when cr16 bit 1 (iride) = 0: active low reset signal for ide; when cr16 bit 1 (iride) = 1: interrupt request signal g. nidben/ irq_h 91 out 12t out 12t when cr16 bit 1 (iride) = 0: active low enable signal for ide; when cr16 bit 1 (iride) = 1: interrupt request signal h. ncs1/ irtx2 95 out 12t out 12t when cr16 bit 1 (iride) = 0: this pin is used to select the ide controller. ncs1 decodes the hdc addresses specified in cr22. when cr16 bit 1 (iride) = 1: function as a infrared transmission data line. ncs0/ irrx2 94 out 12t in t when cr16 bit 1 (iride) = 0: this pin is used to select the ide controller. ncs0 decodes hdc addresses specified in cr21. when cr16 bit 1 (iride) = 1: function as a infrared receiving line. nwe 85 od 24 write enable. an open drain output. ndir 89 od 24 direction of the head step motor. an open drain output. logic 1 = outward motion logic 0 = inward motion nhead 88 od 24 head select. this open drain output determines which disk drive head is active. logic 1 = side 0 logic 0 = side 1 nrwc 87 od 24 reduced write current. this signal can be used on two- speed disk drives to select the transfer rate. an open drain output. logic 0 = 250 kb/s logic 1 = 500 kb/s when bit 5 of cr9 (en3mode) is set to high, the three- mode fdd function is enabled, and the pin will have a different definition. refer to the en3mode bit in cr9. nwd 86 od 24 write data. this logic low open drain writes precompensation serial data to the selected fdd. an open drain output. nstep 82 od 24 step output pulses. this active low open drain output produces a pulse to move the head to another track.
19 symbol pin i/o function nindex 81 in cs this schmitt input from the disk drive is active low when the head is positioned over the beginning of a track marked by an index hole. this input pin is pulled up internally by an approximately 1k ohm resistor. the resistor can be disabled by bit 4 of cr6 (fipurdwn). ntrak0 78 in cs track 0. this schmitt input from the disk drive is active low when the head is positioned over the outermost track. this input pin is pulled up internally by an approximately 1k ohm resistor. the resistor can be disabled by bit 4 of cr6 (fipurdwn). nwp 77 in cs write protected. this active low schmitt input from the disk drive indicates that the diskette is write-protected. this input pin is pulled up internally by an approximately 1k ohm resistor. the resistor can be disabled by bit 4 of cr6 (fipurdwn). nrdata 74 in cs the read data input signal from the fdd. this input pin is pulled up internally by an approximately 1k ohm resistor. the resistor can be disabled by bit 4 of cr6 (fipurdwn). ndskchg 76 in cs diskette change. this signal is active low at power on and whenever the diskette is removed. this input pin is pulled up internally by an approximately 1k ohm resistor. the resistor can be disabled by bit 4 of cr6 (fipurdwn). nmoa 79 od 24 motor a on. when set to 0, this pin enables disk drive 0. this is an open drain output. nmob 80 od 24 motor b on. when set to 0, this pin enables disk drive 1. this is an open drain output. ndsa 83 od 24 drive select a. when set to 0, this pin enables disk drive a. this is an open drain output. ndsb 84 od 24 drive select b. when set to 0, this pin enables disk drive b. this is an open drain output. vdd 15, 56 +5 power supply for the digital circuitry gnd 25, 40 65, 90 ground
20 fdc functional description FDC87W22 fdc the floppy disk controller of the FDC87W22 integrates all of the logic required for floppy disk control. the fdc implements a pc/at or ps/2 solution. all programmable options default to compatible values. the fifo provides better system performance in multi-master systems. the digital data separator supports up to 1 m bits/sec data rate. the fdc includes the following blocks: at interface, precompensation, data rate selection, digital data separator, fifo, and fdc core. at interface the interface consists of the standard asynchronous signals: nrd, nwr, a0-a3, irq, dma control, and a data bus. the address lines select between the configuration registers, the fifo and control/status registers. this interface can be switched between pc/at, model 30, or ps/2 normal modes. the ps/2 register sets are a superset of the registers found in a pc/at. fifo (data) the fifo is 16 bytes in size and has programmable threshold values. all command parameter information and disk data transfers go through the fifo. data transfers are governed by the rqm and dio bits in the main status register. the fifo defaults to disabled mode after any form of reset. this maintains pc/at hardware compatibility. the default values can be changed through the configure command. the advantage of the fifo is that it allows the system a larger dma latency without causing disk errors. the following tables give several examples of the delays with a fifo. the data are based upon the following formula: threshold # (1/data/rate) *8 - 1.5 m s = delay fifo threshold maximum delay to servicing at 500k bps data rate 1 byte 1 16 m s - 1.5 m s = 14.5 m s 2 byte 2 16 m s - 1.5 m s = 30.5 m s 8 byte 8 16 m s - 1.5 m s = 6.5 m s 15 byte 15 16 m s - 1.5 m s = 238.5 m s fifo threshold maximum delay to servicing at 1m bps data rate 1 byte 1 8 m s - 1.5 m s = 6.5 m s 2 byte 2 8 m s - 1.5 m s = 14.5 m s 8 byte 8 8 m s - 1.5 m s = 62.5 m s 15 byte 15 8 m s - 1.5 m s = 118.5 m s
21 at the start of a command the fifo is always disabled and command parameters must be sent based upon the rqm and dio bit settings in the main status register. when the fdc enters the command execution phase, it clears the fifo of any data to ensure that invalid data are not transferred. an overrun and underrun will terminate the current command and the data transfer. disk writes will complete the current sector by generating a 00 pattern and valid crc. reads require the host to remove the remaining data so that the result phase may be entered. dma transfers are enabled with the specify command and are initiated by the fdc by activating the drq pin during a data transfer command. the fifo is enabled directly by asserting ndack and addresses need not be valid. note that if the dma controller is programmed to function in verify mode a pseudo read is performed by the fdc based only on ndack. this mode is only available when the fdc has been configured into byte mode (fifo disabled) and is programmed to do a read. with the fifo enabled the above operation is performed by using the new verify command. no dma operation is needed. data separator the function of the data separator is to lock onto the incoming serial read data. when a lock is achieved the serial front end logic of the chip is provided with a clock which is synchronized to the read data. the synchronized clock, called the data window, is used to internally sample the serial data portion of the bit cell, and the alternate state samples the clock portion. serial to parallel conversion logic separates the read data into clock and data bytes. the digital data separator (dds) has three parts: control logic, error adjustment, and speed tracking. the dds circuit cycles once every 12 clock cycles ideally. any data pulse input will be synchronized and then adjusted by immediate error adjustment. the control logic will generate rdd and rwd for every pulse input. during any cycle where no data pulse is present, the dds cycles are based on speed. a digital integrator is used to keep track of the speed changes in the input data stream. write precompensation the write precompensation logic is used to minimize bit shifts in the rddata stream from the disk drive. shifting of bits is a known phenomenon in magnetic media and is dependent on the disk media and the floppy drive. the fdc monitors the bit stream that is being sent to the drive. the data patterns that require precompensation are well known. depending upon the pattern, the bit is shifted either early or late relative to the surrounding bits. perpendicular recording mode the fdc is also capable of interfacing directly to perpendicular recording floppy drives. perpendicular recording differs from the traditional longitudinal method in that the magnetic bits are oriented vertically. this scheme packs more data bits into the same area. fdcs with perpendicular recording drives can read standard 3.5" floppy disks and can read and write perpendicular media. some manufacturers offer drives that can read and write standard and perpendicular media in a perpendicular media drive.
22 a single command puts the fdc into perpendicular mode. all other commands operate as they normally do. the perpendicular mode requires a 1 mbps data rate for the fdc. at this data rate the fifo eases the host interface bottleneck due to the speed of data transfer to or from the disk. fdc core the FDC87W22 fdc is capable of performing twenty commands. each command is initiated by a multi-byte transfer from the microprocessor. the result can also be a multi- byte transfer back to the microprocessor. each command consists of three phases: command, execution, and result. command the microprocessor issues all required information to the controller to perform a specific operation. execution the controller performs the specified operation. result after the operation is completed, status information and other housekeeping information is provided to the microprocessor.
23 fdc commands command symbol descriptions: c: cylinder number 0 - 256 d: data pattern dir: step direction dir = 0, step out dir = 1, step in ds0: dis k drive select 0 ds1: disk drive select 1 dtl: data length ec: enable count eot: end of track efifo: enable fifo eis: enable implied seek eot: end of track fifothr: fifo threshold gap: gap length selection gpl: gap length h: head number hds: head number select hlt: head load time hut: head unload time lock: lock efifo, fifothr, ptrtrk bits prevent affected by software reset mfm: mfm or fm mode mt: multitrack n: the number of data bytes written in a sector ncn: new cylinder number nd: n on-dma mode ow: overwritten pcn: present cylinder number poll: polling disable pretrk: precompensation start track number r: record rcn: relative cylinder number r/w: read/write sc: sector/per cylinder sk: skip deleted data address mark srt: step rate time st0: status register 0 st1: status register 1 st2: status register 2 st3: status register 3 wg: write gate alters timing of we
24 (1) read data phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm sk 0 0 1 1 0 command codes w 0 0 0 0 0 hds ds1 ds0 w w ---------------------- c ------------------------ ---------------------- h ------------------------ sector id information prior to command execution w w ---------------------- r ------------------------ ---------------------- n ------------------------ w w -------------------- eot ----------------------- -------------------- gpl ----------------------- w -------------------- dtl ----------------------- execution data transfer between the fdd and system result r r r -------------------- st0 ----------------------- -------------------- st1 ----------------------- -------------------- st2 ----------------------- status information after command execution r r r r ---------------------- c ------------------------ ---------------------- h ------------------------ ---------------------- r ------------------------ ---------------------- n ------------------------ sector id information after command execution
25 (2) read deleted data phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm sk 0 1 1 0 0 command codes w 0 0 0 0 0 hds ds1 ds0 w w ---------------------- c ------------------------ ---------------------- h ------------------------ sector id information prior to command execution w w ---------------------- r ------------------------ ---------------------- n ------------------------ w w -------------------- eot ----------------------- -------------------- gpl ----------------------- w -------------------- dtl ----------------------- execution data transfer between the fdd and system result r r r -------------------- st0 ----------------------- -------------------- st1 ----------------------- -------------------- st2 ----------------------- status information after command execution r r r r ---------------------- c ------------------------ ---------------------- h ------------------------ ---------------------- r ------------------------ ---------------------- n ------------------------ sector id information after command execution
26 (3) read a track phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 mfm 0 0 0 0 1 0 command codes w 0 0 0 0 0 hds ds1 ds0 w w ---------------------- c ------------------------ ---------------------- h ------------------------ sector id information prior to command execution w w ---------------------- r ------------------------ ---------------------- n ------------------------ w w -------------------- eot ----------------------- -------------------- gpl ----------------------- w -------------------- dtl ----------------------- execution data transfer between the fdd and system; fdd reads contents of all cylinders from index hole to eot result r r r -------------------- st0 ----------------------- -------------------- st1 ----------------------- -------------------- st2 ----------------------- status information after command execution r r r r ---------------------- c ------------------------ ---------------------- h ------------------------ ---------------------- r ------------------------ ---------------------- n ------------------------ sector id information after command execution
27 (4) read id phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 mfm 0 0 1 0 1 0 command codes w 0 0 0 0 0 hds ds1 ds0 execution the first correct id information on the cylinder is stored in data register result r r r -------------------- st0 ----------------------- -------------------- st1 ----------------------- -------------------- st2 ----------------------- status information after command execution r r r r ---------------------- c ------------------------ ---------------------- h ------------------------ ---------------------- r ------------------------ ---------------------- n ------------------------ disk status after the command has been completed (5) verify phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm sk 1 0 1 1 0 command codes w ec 0 0 0 0 hds ds1 ds0 w w ---------------------- c ------------------------ ---------------------- h ------------------------ sector id information prior to command execution w w ---------------------- r ------------------------ ---------------------- n ------------------------ w w -------------------- eot ----------------------- -------------------- gpl ----------------------- -------------------- dtl/sc ------------------- execution no data transfer takes place result r r r -------------------- st0 ----------------------- -------------------- st1 ----------------------- -------------------- st2 ----------------------- status information after command execution r r r r ---------------------- c ------------------------ ---------------------- h ------------------------ ---------------------- r ------------------------ ---------------------- n ------------------------ sector id information after command execution
28 (6) version phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 1 0 0 0 0 command code result r 1 0 0 1 0 0 0 0 enhanced controller (7) write data phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm 0 0 0 1 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w w ---------------------- c ------------------------ ---------------------- h ------------------------ sector id information prior to command execution w w ---------------------- r ------------------------ ---------------------- n ------------------------ w w -------------------- eot ----------------------- -------------------- gpl ----------------------- w -------------------- dtl ----------------------- execution data transfer between the fdd and system result r r r -------------------- st0 ----------------------- -------------------- st1 ----------------------- -------------------- st2 ----------------------- status information after command execution r r r r ---------------------- c ------------------------ ---------------------- h ------------------------ ---------------------- r ------------------------ ---------------------- n ------------------------ sector id information after command execution
29 (8) write deleted data phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm 0 0 1 0 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w w ---------------------- c ------------------------ ---------------------- h ------------------------ sector id information prior to command execution w w ---------------------- r ------------------------ ---------------------- n ------------------------ w w w -------------------- eot ----------------------- -------------------- gpl ----------------------- -------------------- dtl ----------------------- execution data transfer between the fdd and system result r r r -------------------- st0 ----------------------- -------------------- st1 ----------------------- -------------------- st2 ----------------------- status information after command execution r r r r ---------------------- c ------------------------ ---------------------- h ------------------------ ---------------------- r ------------------------ ---------------------- n ------------------------ sector id information after command execution (9) format a track phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 mfm 0 0 1 1 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w w ---------------------- n ------------------------ --------------------- sc ----------------------- bytes/sector sectors/cylinder w w --------------------- gpl --------------------- ---------------------- d ------------------------ gap 3 filler byte execution for each sector repeat: w w w w ---------------------- c ------------------------ ---------------------- h ------------------------ ---------------------- r ------------------------ ---------------------- n ------------------------ input sector parameters result r r r -------------------- st0 ----------------------- -------------------- st1 ----------------------- -------------------- st2 ----------------------- status information after command execution r r r r ---------------- undefined ------------------- ---------------- undefined ------------------- ---------------- undefined ------------------- ---------------- undefined -------------------
30 (10) recalibrate phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 0 1 1 1 command codes w 0 0 0 0 0 0 ds1 ds0 execution head retracted to track 0 interrupt (11) sense interrupt status phase r/w d7 76 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 1 0 0 0 command code result r r ---------------- st0 ------------------------- ---------------- pcn ------------------------- status information at the end of each seek operation (12) specify phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 0 0 1 1 command codes w w | ---------srt ----------- | --------- hut ---------- | |------------ hlt ----------------------------------| nd (13) seek phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 1 1 1 1 command codes w w 0 0 0 0 0 hds ds1 ds0 -------------------- ncn ----------------------- execution r head positioned over proper cylinder on diskette (14) configure phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 1 0 0 1 1 configure information w w w 0 0 0 0 0 0 0 0 0 eis efifo poll | ------ fifothr ----| | --------------------pretrk ---------------------- | execution internal registers written
31 (15) relative seek phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 1 dir 0 0 1 1 1 1 command codes w w 0 0 0 0 0 hds ds1 ds0 | -------------------- rcn ---------------------------- | (16) dumpreg phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 1 1 1 0 registers placed in fifo result r r r r r r r r r r -------------------- pcn-drive 0----------------- -------------------- pcn-drive 1 ---------------- -------------------- pcn-drive 2----------------- -------------------- pcn-drive 3 ---------------- -------srt ----------------- | --------- hut -------- ------------ hlt -------------------------------------| nd -------------------- sc/eot -------------------- lock 0 d3 d2 d1 d0 gap wg 0 eis efifo poll | ------ fifothr -------- --------------------pretrk --------------------- (17) perpendicular mode phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 1 0 0 1 0 command code w ow 0 d3 d2 d1 d0 gap wg (18) lock phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w lock 0 0 1 0 1 0 0 command code result r 0 0 0 lock 0 0 0 0 (19) sense drive status phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 0 1 0 0 command code w 0 0 0 0 0 hds ds1 ds0 result r ---------------- st3 ------------------------- status information about disk drive
32 (20) invalid phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w ------------- invalid codes ----------------- invalid codes (no operation - fdc goes into standby state) result r -------------------- st0 ---------------------- st0 = 80h register descriptions there are several status, data, and control registers in FDC87W22. these registers are defined below: address register offset read write base address + 0 base address + 1 base address + 2 base address + 3 sa register sb register td register do register td register base address + 4 ms register dr register base address + 5 dt (fifo) register dt (fifo) register base address + 7 di register cc register
33 status register a (sa register) (read base address + 0) this register is used to monitor several disk interface pins in ps/2 and model 30 modes. in ps/2 mode, the bit definitions for this register are as follows: init pending (bit 7): this bit indicates the value of the floppy disk interrupt output. ndrv2 (bit 6): 0 a second drive has been installed 1 a second dri ve has not been installed step (bit 5): this bit indicates the complement of nstep output. ntrak0 (bit 4): this bit indicates the value of ntrak0 input. head (bit 3): this bit indicates the complement of nhead output. 0 side 0 1 side 1 nindex (bit 2): this bit indicates the value of nindex output. nwp (bit 1): 0 disk is write-protected 1 disk is not write-protected dir (bit 0) this bit indicates the direction of head movement. 0 outward direction 1 inward direction 1 2 3 4 5 6 7 0 nwp nindex head ntrak0 step ndrv2 init pending dir
34 in ps/2 model 30 mode, the bit definitions for this register are as follows: init pending (bit 7): this bit indicates the value of the floppy disk interrupt output. drq (bit 6): this bit indicates the value of drq output pin. step f/f (bit 5): this bit indicates the complement of latched nstep output. trak0 (bit 4): this bit indicates the complement of ntrak0 input. nhead (bit 3): this bit indicates the value of nhead output. 0 side 1 1 side 0 index (bit 2): this bit indicates the complement of nindex output. wp (bit 1): 0 disk is not write-protected 1 disk is write-protected ndir(bit 0) this bit indicates the direction of head movement. 0 inward direction 1 outward direction 1 2 3 4 5 6 7 0 wp index nhead trak0 step f/f drq init pending ndir
35 status register b (sb register) (read base address + 1) this register is used to monitor several disk interface pins in ps/2 and model 30 modes. in ps/2 mode, the bit definitions for this register are as follows: 1 2 3 4 5 6 7 0 mot en a we rdata toggle wdata toggle drive sel0 mot en b 1 1 drive sel0 (bit 5): this bit indicates the status of do register bit 0 (drive select bit 0). wdata toggle (bit 4): this bit changes state at every rising edge of the nwd output pin. rdata toggle (bit 3): this bit changes state at every rising edge of the nrdata output pin. we (bit 2): this bit indicates the complement of the nwe output pin. mot en b (bit 1) this bit indicates the complement of the nmob output pin.
36 mot en a (bit 0) this bit indicates the complement of the nmoa output pin. in ps/2 model 30 mode, the bit definitions for this register are as follows: ndrv2 (bit 7): 0 a second drive has been installed 1 a second drive has not been installed ndsb (bit 6): this bit indicates the status of ndsb output pin. ndsa (bit 5): this bit indicates the status of ndsa output pin. wd f/f(bit 4): this bit indicates the complement of the latched nwd output pin at every rising edge of the nwd output pin. rdata f/f(bit 3): this bit indicates the complement of the latched nrdata output pin . we f/f (bit 2): this bit indicates the complement of latched nwe output pin. ndsd (bit 1): 0 drive d has been selected 1 drive d has not been selected ndsc (bit 0): 0 drive c has been selected 1 drive c has not been selected 1 2 3 4 5 6 7 0 ndsc ndsd we f/f rdata f/f ndsa ndsb ndrv2 wd f/f
37 digital output register (do register) (write base address + 2) the digital output register is a write-only register controlling drive motors, drive selection, drq/irq enable, and fdc resetting. all the bits in this register are cleared by the mr pin. the bit definitions are as follows: 7 6 5 4 3 2 1-0 drive select: 00 select drive a 01 select drive b 10 select drive c 11 select drive d floppy disk controller reset active low resets fdc dma and int enable active high enable drq/irq motor enable a. motor a on when active high motor enable b. motor b on when active high motor enable c. motor c on when active high motor enable d. motor d on when active high tape drive register (td register) (read base address + 3) this register is used to assign a particular drive number to the tape drive support mode of the data separator. this register also holds the media id, drive type, and floppy boot drive information of the floppy disk drive. in normal floppy mode, this register includes only bit 0 and 1. the bit definitions are as follows: 1 2 3 4 5 6 7 0 tape sel 0 tape sel 1 x x x x x x if three mode fdd function is enabled (en3mode = 1 in cr9), the bit definitions are as follows: 1 2 3 4 5 6 7 0 floppy boot drive 0 floppy boot drive 1 drive type id0 drive type id1 media id0 media id1 tape sel 0 tape sel 1
38 media id1 media id0 (bit 7, 6): these two bits are read only. these two bits reflect the value of cr8 bit 3, 2. drive type id1 drive type id0 (bit 5, 4): these two bits reflect two of the bits of cr7. which two bits are reflected depends on the last drive selected in the do register. floppy boot drive 1, 0 (bit 3, 2): these two bits reflect the value of cr8 bit 1, 0. tape sel 1, tape sel 0 (bit 1, 0): these two bits assign a logical drive number to the tape drive. drive 0 is not available as a tape drive and is reserved as the floppy disk boot drive. tape sel 1 tape sel 0 drive selected 0 0 none 0 1 1 1 0 2 1 1 3 main status register (ms register) (read base address + 4) the main status register is used to control the flow of data between the microprocessor and the controller. the bit definitions for this register are as follows: fdd 0 busy, (d0b = 1), fdd number 0 is in the seek mode. fdd 1 busy, (d1b = 1), fdd number 1 is in the seek mode. fdc busy, (cb). a read or write command is in the process when cb = high. non-dma mode, the fdc is in the non-dma mode, this bit is set only during the execution phase in non-dma mode. transition to low state indicates execution phase has ended. data input/output, (dio). if dio= high then transfer is from data register to the processor. if dio = low then transfer is from processor to data register. request for master (rqm). a high on this bit indicates data register is ready to send or receive data to or from the processor. 7 6 5 4 3 2 1 0 fdd 2 busy, (d2b = 1), fdd number 2 is in the seek mode. fdd 3 busy, (d3b = 1), fdd number 3 is in the seek mode.
39 data rate register (dr register) (write base address + 4) the data rate register is used to set the transfer rate and write precompensation. the data rate of the fdc is programmed by the cc register for pc-at and ps/2 model 30 and ps/2 mode, and not by the dr register. the real data rate is determined by the most recent write to either of the dr register or cc register. 1 2 3 4 5 6 7 0 drate0 drate1 precomp0 precomp1 precomp2 power down s/w reset 0 s/w reset (bit 7): this bit is the software reset bit. power-down (bit 6): 0 fdc in normal mode 1 fdc in power-down mode precomp2 precomp1 precomp0 (bit 4, 3, 2): these three bits select the value of write precompensation. the following tables show the precompensation values for the combination of these bits.
40 precom 2 1 0 precompensation delay 0 0 0 default delays 0 0 1 41.67 ns 0 1 0 83.34 ns 0 1 1 125.00 ns 1 0 0 166.67 ns 1 0 1 208.33 ns 1 1 0 250.00 ns 1 1 1 0.00 ns (disabled) data rate default precompensation delays 250 kb/s 125 ns 300 kb/s 125 ns 500 kb/s 125 ns 1 mb/s 41.67 ns drate1 drate0 (bit 1, 0): these two bits select the data rate of the fdc and reduced write current control. 00 500 kb/s (mfm), 250 kb/s (fm), nrwc = 1. 01 300 kb/s (mfm), 150 kb/s (fm), nrwc = 0. 10 250 kb/s (mfm), 125 kb/s (fm), nrwc = 0. 11 1 mb/s (mfm), illegal (fm), nrwc = 1. fifo register (r/w base address + 5) the data register consists of four status registers in a stack with only one register presented to the data bus at a time. this register stores data, commands, and parameters and provides diskette-drive status information. data bytes are passed through the data register to program or obtain results after a command. in the FDC87W22, this register defaults to fifo disabled mode after reset. the fifo can change its value and enable its operation through the configure command.
41 status register 0 (st0) status register 1 (st1) 7-6 5 4 3 2 1-0 us1, us0 drive select: 00 drive a selected 01 drive b selected 10 drive c selected 11 drive d selected hd head address: 1 head selected 0 head selected nr not ready: 1 drive is not ready 0 drive is ready ec equipment check: 1 when a fault signal is received from the fdd or the track 0 signal fails to occur after 77 step pulses 0 no error se seek end: 1 seek end 0 seek error ic interrupt code: 00 normal termination of command 01 abnormal termination of command 10 invalid command issue 11 abnormal termination because the ready signal from fdd changed state during command execution missing address mark. 1 when the fdc cannot detect the data address mark or the data address mark has been deleted. nw (not writable). 1 if a write protect signal is detected from the diskette drive during execution of write data. nd (no data). 1 if specified sector cannot be found during execution of a read, write or verifly data. not used. this bit is always 0. or (over rum). 1 if the fdc is not serviced by the host system within a certain time interval during data transfer. de (data error).1 when the fdc detects a crc error in either the id field or the data field. not used. this bit is always 0. en (end of track). 1 when the fdc tries to access a sector beyond the final sector of a cylinder. 0 1 2 3 4 5 6 7
42 status register 2 (st2) 1 2 3 4 5 6 7 0 bc (bad cylinder) md (missing address mark in data field). 1 if the fdc cannot find a data address mark (or the address mark has been deleted) when reading data from the media 0 no error 1 bad cylinder 0 no error sn (scan not satisfied) 1 during execution of the scan command 0 no error sh (scan equal hit) 1 during execution of the scan command, if the equal condition is satisfied 0 no error wc (wrong cylinder) 1 indicates wrong cylinder dd (data error in the data field) 1 if the fdc detects a crc error in the data field 0 no error cm (control mark) 1 during execution of the read data or scan command 0 no error not used. this bit is always 0 status register 3 (st3) 1 2 3 4 5 6 7 0 us0 unit select 0 us1 unit select 1 hd head address ts two-side to track 0 ry ready wp write protected ft fault digital input register (di register) (read base address + 7) the digital input register is an 8-bit read-only register used for diagnostic purposes. in a pc/xt or at only bit 7 is checked by the bios. when the register is read, bit 7 shows the complement of ndskchg, while other bits of the data bus remain in tri-state. bit definitions are as follows: x x x x x x x x 0 1 2 3 4 5 6 7 reserved for the hard disk controller during a read of this register, these bits are in tri-state dskchg
43 in the ps/2 mode, the bit definitions are as follows: dskchg (bit 7): this bit indicates the complement of the ndskchg input. bit 6-3: these bits are always a logic 1 during a read. drate1 drate0 (bit 2, 1): these two bits select the data rate of the fdc. refer to the dr register bits 1 and 0 for the settings corresponding to the individual data rates. nhigh dens (bit 0): 0 500 kb/s or 1 mb/s data rate (high density fdd) 1 250 kb/s or 300 kb/s data rate in the ps/2 model 30 mode, the bit definitions are as follows: dskchg (bit 7): this bit indicates the status of ndskchg input. bit 6-4: these bits are always a logic 1 during a read. 1 2 3 4 5 6 7 0 nhigh dens drate0 drate1 dskchg 1 1 1 1 1 2 3 4 5 6 7 0 drate0 drate1 ndskchg noprec dmaen 0 0 0
44 dmaen (bit 3): this bit indicates the value of do register bit 3. noprec (bit 2): this bit indicates the value of cc register noprec bit. drate1 drate0 (bit 1, 0): these two bits select the data rate of the fdc. configuration control register (cc register) (write base address + 7) this register is used to control the data rate. in the pc/at and ps/2 mode, the bit definitions are as follows: x x x x x x drate0 drate1 0 1 2 3 4 5 7 6 x: reserved bit 7-2: reserved. these bits should be set to 0. drate1 drate0 (bit 1, 0): these two bits select the data rate of the fdc. in the ps/2 model 30 mode, the bit definitions are as follows: 1 2 3 4 5 6 7 0 drate0 drate1 noprec x x x x x x: reserved bit 7-3: reserved. these bits should be set to 0. noprec (bit 2): this bit indicates no precompensation. it has no function and can be set by software. drate1 drate0 (bit 1, 0): these two bits select the data rate of the fdc.
45 ide the ide interface is essentially the at bus ported to the hard disk drive. the hard disk controller resides on the ide hard disk drive. so the ide interface provides only chip select signals and at bus signals between the ide hard disk drive and isa slot. table 1 shows the ide registers and their isa addresses. table 1 i/o address registers offset read write ncs0 base address + 0 data register data register ncs0 base address + 1 error register write-precomp ncs0 base address + 2 sector count sector count ncs0 base address + 3 sector number sector number ncs0 base address + 4 cylinder low cylinder low ncs0 base address + 5 cylinder high cylinder high ncs0 base address + 6 sdh register sdh register ncs0 base address + 7 status register command register ncs1 base address + 6 alternate status fixed disk control ide decode description when the processor selects the addresses which match the ones specified in cr 21, the chip system enables ncs0 = low; otherwise, ncs0 = high. when the processor selects the address which matches the one specified in cr22, the chip system enables ncs1 = low; otherwise, ncs1 = high.
46 uart port universal asynchronous receiver/transmitter (uart a, uart b) the uarts are used to convert parallel data into serial format on the transmit side and convert serial data to parallel format on the receiver side. the serial format, in order of transmission and reception, is a start bit, followed by five to eight data bits, a parity bit (if programmed) and one, one and half (five-bit format only) or two stop bits. the uarts are capable of handling divisors of 1 to 65535 and producing a 16x clock for driving the internal transmitter logic. provisions are also included to use this 16x clock to drive the receiver logic. the uarts also support the midi data rate. furthermore, the uarts also include complete modem control capability and a processor interrupt system that may be software trailed to the computing time required to handle the communication link. the uarts have a fifo mode to reduce the number of interrupts presented to the cpu. in each uart, there are 16-byte fifos for both receive and transmit mode. register address table 2 - uart register bit map bit number r egister a ddress b ase 0 1 2 3 8 bdlab = 0 r eceiver b uffer r egister (read only) rbr rx data bit 0 rx data bit 1 rx data bit 2 rx data bit 3 8 bdlab = 0 t ransmitter b uffer r egister ( write only) tbr tx data bit 0 tx data bit 1 tx data bit 2 tx data bit 3 9 bdlab = 0 i nterrupt c ontrol r egister icr rbr data ready interrupt enable (erdri) tbr empty interrupt enable (etbrei) usr interrupt enable (eusri) hsr interrupt enable (ehsri) a i nterrupt s tatus r egister ( read only ) isr "0" if interrupt pending interrupt status bit (0) interrupt status bit (1) interrupt status bit (2)** a u art fifo c ontrol r egister (write only) ufr fifo enable rcvr fifo reset xmit fifo reset dma mode select
47 bit number r egister a ddress b ase 0 1 2 3 b u art c ontrol r egister ucr data length select bit 0 (dls0) data length select bit 1 (dls1) multiple stop bits enable (msbe) parity bit enable (pbe) c h andshake c ontrol r egister hcr data terminal ready (dtr) request to send (rts) loopback ri input irq enable d u art s tatus r egister usr rbr data ready (rdr) overrun error (oer) parity bit error (pber) no stop bit error (nser) e h andshake s tatus r egister hsr cts toggling (tcts) dsr toggling (tdsr) ri falling edge (feri) dcd toggling (tdcd) f u ser d efined r egister udr bit 0 bit 1 bit 2 bit 3 8 bdlab = 1 b audrate d ivisor l atch l ow bll bit 0 bit 1 bit 2 bit 3 9 bdlab = 1 b audrate d ivisor l atch h igh bhl bit 8 bit 9 bit 10 bit 11 *: bit 0 is the least significant bit. the least significant bit is the first bit serially transmitted or received. **: these bits are always 0 in 16450 mode. table 2 - uart register bit map (continued) bit number register address base 4 5 6 7 8 bdlab = 0 receiver buffer register (read only) rbr rx data bit 4 rx data bit 5 rx data bit 6 rx data bit 7 8 bdlab = 0 transmitter buffer register (write only) tbr tx data bit 4 tx data bit 5 tx data bit 6 tx data bit 7 9 bdlab = 0 interrupt control register icr 0 0 0 0
48 bit number register address base 4 5 6 7 a interrupt status register (read only) isr 0 0 fifos enabled ** fifos enabled ** a uart fifo control register (write only) ufr reserved reversed rx interrupt active level (lsb) rx interrupt active level (msb) b uart control register ucr even parity enable (epe) parity bit fixed enable pbfe) set silence enable (sse) baud rate divisor latch access bit (bdlab) c handshake control register hcr internal loopback enable 0 0 0 d uart status register usr silent byte detected (sbd) tbr empty (tbre) tsr empty (tsre) rx fifo error indication (rfei) ** e handshake status register hsr clear to send (cts) data set ready (dsr) ring indicator (ri) data carrier detect (dcd) f user defined register udr bit 4 bit 5 bit 6 bit 7 8 bdlab = 1 baudrate divisor latch low bll bit 4 bit 5 bit 6 bit 7 9 bdlab = 1 baudrate divisor latch high bhl bit 12 bit 13 bit 14 bit 15 *: bit 0 is the least significant bit. the least significant bit is the first bit serially transmitted or received. **: these bits are always 0 in 16450 mode.
49 uart control register (ucr) (read/write) the uart control register controls and defines the protocol for asynchronous data communications, including data length, stop bit, parity, and baud rate selection. 1 2 3 4 5 6 7 0 data length select bit 0 (dls0) data length select bit 1(dls1) multiple stop bits enable (msbe) parity bit enable (pbe) even parity enable (epe) parity bit fixed enable (pbfe) set silence enable (sse) baudrate divisor latch access bit (bdlab) bit 7: bdlab. when this bit is set to a logical 1, designers can access the divisor (in 16-bit binary format) from the divisor latches of the baudrate generator during a read or write operation. when this bit is reset, the receiver buffer register, the transmitter buffer register, or the interrupt control register can be accessed. bit 6: sse. a logical 1 forces the serial output (sout) to a silent state (a logical 0). only sout is affected by this bit; the transmitter is not affected. bit 5: pbfe. when pbe and pbfe of ucr are both set to a logical 1, (1) if epe is a logical 1, the parity bit is fixed as a logical 0 to transmit and check. (2) if epe is a logical 0, the parity bit is fixed as a logical 1 to transmit and check. bit 4: epe. this bit describes the number of logic 1's in the data word bits and parity bit only when bit 3 is programmed. when this bit is set, an even number of logic 1's are sent or checked. when the bit is reset, an odd number of logic 1's are sent or checked. bit 3: pbe. when this bit is set, the position between the last data bit and the stop bit of the sout will be stuffed with the parity bit at the transmitter. for the receiver, the parity bit in the same position as the transmitter will be detected. bit 2: msbe. this bit defines the number of stop bits in each serial character that is transmitted or received. (1) if msbe is set to a logical 0, one stop bit is sent and check ed. (2) if msbe is set to a logical 1, and data length is 5 bits, one and a half stop bits are sent and checked. (3) if msbe is set to a logical 1, and data length is 6, 7, or 8 bits, two stop bits are sent and checked. bits 0 and 1: dls0, dls1. these tw o bits define the number of data bits that are sent or checked in each serial character.
50 table 3 - word length definition dls1 dls0 data length 0 0 5 bits 0 1 6 bits 1 0 7 bits 1 1 8 bits uart status register (usr) (read/write) this 8-bit register provides information about the status of the data transfer during communication. 1 2 3 4 5 6 7 0 rbr data ready (rdr) overrun error (oer) parity bit error (pber) no stop bit error (nser) silent byte detected (sbd) transmitter buffer register empty (tbre) transmitter shift register empty (tsre) rx fifo error indication (rfei) bit 7: rfei. in 16450 mode, this bit is always set to a logic 0. in 16550 mode, this bit is set to a logic 1 when there is at least one parity bit error, no stop bit error or silent byte detected in the fifo. in 16550 mode, this bit is cleared by reading from the usr if there are no remaining errors left in the fifo. bit 6: tsre. in 16450 mode, when tbr and tsr are both empty, this bit will be set to a logical 1. in 16550 mode, if the transmit fifo and tsr are both empty, it will be set to a logical 1. other than these two cases, this bit will be reset to a logical 0. bit 5: tbre. in 16450 mode, when a data character is transferred from tbr to tsr, this bit will be set to a logical 1. if etrei of icr is a logical 1, an interrupt will be generated to notify the cpu to write the next data. in 16550 mode, this bit will be set to a logical 1 when the transmit fifo is empty. it will be reset to a logical 0 when the cpu writes data into tbr or fifo. bit 4: sbd. this bit is set to a logical 1 to indicate that received data are kept in silent state for a full word time, including start bit, data bits, parity bit, and stop bits. in 16550 mode, it indicates the same condition for the data on top of the fifo. when the cpu reads usr, it will clear this bit to a logical 0. bit 3: nser. this bit is set to a logical 1 to indicate that the received data have no stop bit. in 16550 mode, it indicates t he same condition for the data on top of the fifo. when the cpu reads usr, it will clear this bit to a logical 0. bit 2: pber. this bit is set to a logical 1 to indicate that the parity bit of received data is wrong. in 16550 mode, it indicates the same condition for the data on top of the fifo. when the cpu reads usr, it will clear this bit to a logical 0.
51 bit 1: oer. this bit is set to a logical 1 to indicate received data have been overwritten by the next received data before they were read by the cpu. in 16550 mode, it indicates the same condition instead of fifo full. when the cpu reads usr, it will clear this bit to a logical 0. bit 0: rdr. this bit is set to a logical 1 to indicate received data are ready to be read by the cpu in the rbr or fifo. after no data are left in the rbr or fifo, the bit will be reset to a logical 0. handshake control register (hcr) (read/write) this register controls the pins of the uart used for handshaking peripherals such as modem, and controls the diagnostic mode of the uart. 0 0 0 0 1 2 3 4 5 6 7 data terminal ready (dtr) request to send (rts) loopback ri input irq enable internal loopback enable bit 4: when this bit is set to a logical 1, the uart enters diagnostic mode by an internal loopback, as follows: (1) sout is forced to a logical 1, and sin is isolated from the communication link instead of the tsr. (2) modem output pins are set to their inactive state. (3) modem input pins are isolated from the communication link and connect internally as dtr (bit 0 of hcr) ? ndsr, rts ( bit 1 of hcr) ? ncts, loopback ri input ( bit 2 of hcr) ? nri and irq enable ( bit 3 of hcr) ? ndcd. aside from the above connections, the uart operates normally. this method allows the cpu to test the uart in a convenient way. bit 3: the uart interrupt output is enabled by setting this bit to a logic 1. in the diagnostic mode this bit is internally connected to the modem control input ndcd. bit 2: this bit is used only in the diagnostic mode. in the diagnostic mode this bit is internally connected to the modem control input nri. bit 1: this bit controls the nrts output. the value of this bit is inverted and output to nrts. bit 0: this bit controls the ndtr output. the value of this bit is inverted and output to ndtr.
52 handshake status register (hsr) (read/write) this register reflects the current state of four input pins for handshake peripherals such as a modem and records changes on these pins. bit 7: this bit is the opposite of the ndcd input. this bit is equivalent to bit 3 of hcr in loopback mode. bit 6: this bit is the opposite of the nri input. this bit is equivalent to bit 2 of hcr in loopback mode. bit 5: this bit is the opposite of the ndsr input. this bit is equivalent to bit 0 of hcr in loopbac k mode. bit 4: this bit is the opposite of the ncts input. this bit is equivalent to bit 1 of hcr in loopback mode. bit 3: tdcd. this bit indicates that the ndcd pin has changed state after hsr was read by the cpu. bit 2: feri. this bit indicates tha t the nri pin has changed from low to high state after hsr was read by the cpu. bit 1: tdsr. this bit indicates that the ndsr pin has changed state after hsr was read by the cpu. bit 0: tcts. this bit indicates that the ncts pin has changed state after hsr was read by the cpu. 1 2 3 4 5 6 7 0 ri falling edge (feri) clear to send (cts) data set ready (dsr) ring indicator (ri) data carrier detect (dcd) ncts toggling (tcts) ndsr toggling (tdsr) ndcd toggling (tdcd)
53 uart fifo control register (ufr) (write only) this register is used to control the fifo functions of the uart. 1 2 3 4 5 6 7 0 fifo enable receiver fifo reset transmitter fifo reset dma mode select reserved reserved rx interrupt active level (lsb) rx interrupt active level (msb) bit 6, 7: these two bits are used to set the active level for the receiver fifo interrupt. for example, if the interrupt active level is set as 4 bytes, once there are more than 4 data characters in the receiver fifo, the interrupt will be activated to notify the cpu to read the data from the fifo. table 4 - fifo trigger level bit 7 bit 6 rx fifo interrupt active level (bytes) 0 0 01 0 1 04 1 0 08 1 1 14 bit 4, 5: reserved bit 3: when this bit is programmed to logic 1, the dma mode will change from mode 0 to mode 1 if ufr bit 0 = 1. bit 2: setting this bit to a logical 1 r esets the tx fifo counter logic to initial state. this bit will clear to a logical 0 by itself after being set to a logical 1. bit 1: setting this bit to a logical 1 resets the rx fifo counter logic to initial state. this bit will clear to a logical 0 by itself after being set to a logical 1. bit 0: this bit enables the 16550 (fifo) mode of the uart. this bit should be set to a logical 1 before other bits of ufr are programmed.
54 interrupt status register (isr) (read only) this register reflects the uart interrupt status, which is encoded by different interrupt sources into 3 bits. 1 2 3 4 5 6 7 0 0 if interrupt pending interrupt status bit 0 interrupt status bit 1 interrupt status bit 2 fifos enabled fifos enabled 0 0 bit 7, 6: these two bits are set to a logical 1 when ufr bit 0 = 1. bit 5, 4: these two bits are always logic 0. bit 3: in 16450 mode, th is bit is 0. in 16550 mode, both bit 3 and 2 are set to a logical 1 when a time-out interrupt is pending. bit 2, 1: these two bits identify the priority level of the pending interrupt, as shown in the table below. bit 0: this bit is a logical 1 if there is no interrupt pending. if one of the interrupt sources has occurred, this bit will be set to a logical 0.
55 table 5 - interrupt control function isr interrupt set and function bit 3 bit 2 bit 1 bit 0 interrupt priority interrupt type interrupt source clear interrupt 0 0 0 1 - - no interrupt pending - 0 1 1 0 first uart receive status 1. oer = 1 2. pber =1 3. nser = 1 4. sbd = 1 read usr 0 1 0 0 second rbr data ready 1. rbr data ready 2. fifo interrupt active level reached 1. read rbr 2. read rbr until fifo data under active level 1 1 0 0 second fifo data timeout data present in rx fifo for 4 characters period of time since last access of rx fifo. read rbr 0 0 1 0 third tbr empty tbr empty 1. write data into tbr 2. read isr (if priority is third) 0 0 0 0 fourth handshake status 1. tcts = 1 2. tdsr = 1 3. feri = 1 4. tdcd = 1 read hsr ** bit 3 of isr is enabled when bit 0 of ufr is logical 1.
56 interrupt control register (icr) (read/write) this 8-bit register allows the five types of controller interrupts to activate the interrupt output signal separately. the interrupt system can be totally disabled by resetting bits 0 through 3 of the interrupt control register (icr). a selected interrupt can be enabled by setting the appropriate bits of this register to a logical 1. 0 0 0 1 2 3 4 5 6 7 0 0 rbr data ready interrupt enable (erdri) tbr empty interrupt enable (etbrei) uart receive status interrupt enable (eusri) handshake status interrupt enable (ehsri) bit 7-4: these four bits are always logic 0. bit 3: ehsri. setting this bit to a logical 1 enables the handshake status register interrupt. bit 2: eusri. setting th is bit to a logical 1 enables the uart status register interrupt. bit 1: etbrei. setting this bit to a logical 1 enables the tbr empty interrupt. bit 0: erdri. setting this bit to a logical 1 enables the rbr data ready interrupt. programmable baud generator (bll/bhl) (read/write) two 8-bit registers, bll and bhl, compose a programmable baud generator that uses 24 mhz to generate a 1.8461 mhz frequency and divides it by a divisor from 1 to 2 16 -1. the output frequency of the baud generator is the baud rate multiplied by 16, and this is the base frequency for the transmitter and receiver. the table below illustrates the use of the baud generator with a frequency of 1.8461 mhz. in high-speed uart mode (refer to cr0c bit7 and cr0c bit6), the programmable baud generator directly uses 24 mhz and the same divisor as the normal speed divisor. in high-speed mode, the data transmission rate can be as high as 1.5m bps.
57 user-defined register (udr) (read/write) this is a temporary register that can be accessed and defined by the user. table 6 - baud rates baud rate using 24 mh z to generate 1.8461 mh z desired baud rate decimal divisor used to generate 16x clock percent error difference between desired and actual 50 2304 ** 75 1536 ** 110 1047 0.18% 134.5 857 0.099% 150 768 ** 300 384 ** 600 192 ** 1200 96 ** 1800 64 ** 2000 58 0.53% 2400 48 ** 3600 32 ** 4800 24 ** 7200 16 ** 9600 12 ** 19200 6 ** 38400 3 ** 57600 2 ** 115200 1 ** 230400 104* ** 460800 52* ** 921600 26* ** 1.5m 1* 0% * only use in high speed mode (refer to cr0c bit 7 and cr0c bit 6). ** the percentage error for all baud rates, except where indicated otherwise, is 0.16%.
58 parallel port printer interface logic the parallel port of the FDC87W22 makes possible the attachment of various devices that accept eight bits of parallel data at standard ttl level. the FDC87W22 supports an ibm xt/at compatible parallel port (spp), bi-directional parallel port (bpp), enhanced parallel port (epp), extended capabilities parallel port (ecp), extension fdd mode (extfdd), and extension 2fdd mode (ext2fdd) on the parallel port. refer to the configuration registers for more information on disabling, power-down, and on selecting the mode of operation. table 7a shows the pin definitions for different modes of the parallel port. table 7a - parallel port connector and pin definition for spp/epp/ecp modes host connector pin number of FDC87W22 pin attribute spp epp ecp 1 19 o nstb nwrite nstb 2-9 9-14,16-17 i/o pd<0:7> pd<0:7> pd<0:7> 10 26 i nack intr nack 11 24 i busy nwait busy, periphack 2 12 27 i pe pe peerror, nackreverse 2 13 28 i slct select slct 14 20 o nafd ndstrb nafd, hostack 2 15 29 i nerr nerror nfault 1 , nperiphrequest 2 16 21 o ninit ninit ninit 1 , nreverserqst 2 17 22 o nslin nastrb nslin 1,2 notes: n : active low 1. compatible mode 2. high speed mode 3. for more information, refer to the ieee 1284 standard.
59 table 7b - parallel port connector and pin definition for extfdd and ext2fdd modes host connector pin number FDC87W22 pin attri- bute spp pin attri- bute ext2fdd pin attri- bute ext-fdd 1 19 o nstb --- --- --- --- 2 9 i/o pd0 i nindex2 i nindex2 3 10 i/o pd1 i ntrak02 i ntrak02 4 11 i/o pd2 i nwp2 i nwp2 5 12 i/o pd3 i nrdata2 i nrdata2 6 13 i/o pd4 i ndskchg2 i ndskchg2 7 14 i/o pd5 --- --- --- --- 8 15 i/o pd6 od nmoa2 --- --- 9 16 i/o pd7 od ndsa2 --- --- 10 26 i nack od ndsb2 od ndsb2 11 24 i busy od nmob2 od nmob2 12 27 i pe od nwd2 od nwd2 13 28 i slct od nwe2 od nwe2 14 20 o nafd od nrwc2 od nrwc2 15 29 i nerr od nnerr2 od nnerr2 16 21 o ninit od ndir2 od ndir2 17 22 o nslin od nstep2 od nstep2
60 host connector pin number FDC87W22 pin attri- bute spp pin attri- bute extadp mode pin attri- bute joystick mode 1 19 o nstb o nxwr o vdd 2 9 i/o pd0 i/o xd0 i jp0 3 10 i/o pd1 i/o xd1 i jp1 4 11 i/o pd2 i/o xd2 i --- 5 12 i/o pd3 i/o xd3 i --- 6 13 i/o pd4 i/o xd4 i jb0 7 14 i/o pd5 i/o xd5 i jb1 8 15 i/o pd6 i/o xd6 i --- 9 16 i/o pd7 i/o xd7 i --- 10 26 i nack i xdrq i --- 11 24 i busy i xirq i --- 12 27 i pe o xa0 i --- 13 28 i slct o xa1 i --- 14 20 o nafd o nxrd o vdd 15 29 i nerr o xa2 i --- 16 21 o ninit o nxdack o vdd 17 22 o nslin o tc o vdd
61 enhanced parallel port (epp) table 8 - printer mode and epp register address a2 a1 a0 register note 0 0 0 data port (r/w) 1 0 0 1 printer status buffer (read) 1 0 1 0 printer control latch (write) 1 0 1 0 printer control swapper (read) 1 0 1 1 epp address port (r/w) 2 1 0 0 epp data port 0 (r/w) 2 1 0 1 epp data port 1 (r/w) 2 1 1 0 epp data port 2 (r/w) 2 1 1 1 epp data port 2 (r/w) 2 notes: 1. these registers are available in all modes. 2. these registers are available only in epp mode. data swapper the system microprocessor can read the contents of the printer's data latch by reading the data swapper. printer status buffer the system microprocessor can read the printer status by reading the address of the printer status buffer. the bit definitions are as follows: bit 7: this signal is a ctive during data entry, when the printer is off-line during printing, when the print head is changing position, or during an error state. when this signal is active, the printer is busy and cannot accept data. 1 1 1 2 3 5 4 6 7 0 tmout nerror slct pe nbusy nack
62 bit 6: this bit represents the current sta te of the printer's nack signal. a 0 means the printer has received a character and is ready to accept another. normally, this signal will be active for approximately 5 microseconds before nbusy stops. bit 5: a 1 means the printer has detected the end o f paper. bit 4: a 1 means the printer is selected. bit 3: a 0 means the printer has encountered an error condition. bit 1, 2: these two bits are not implemented and are logic one during a read of the status register. bit 0: this bit is valid in epp mo de only. it indicates that a 10 m s time-out has occurred on the epp bus. a logic 0 means that no time-out error has occurred; a logic 1 means that a time-out error has been detected. writing a logic 1 to this bit will clear the time-out status bit; writing a logic 0 has no effect. printer control latch and printer control swapper the system microprocessor can read the contents of the printer control latch by reading the printer control swapper. bit definitions are as follows: bit 7,6: these two bits are a logic one during a read. they can be written. bit 5: direction control bit when this bit is a logic 1, the parallel port is in input mode (read); when it is a logic 0, the parallel port is in output mode (write). this bit can be read and written. in spp mode, this bit is invalid and fixed at zero. bit 4: a 1 in this position allows an interrupt to occur when nack changes from low to high. bit 3: a 1 in this bit position selects the printer. bit 2: a 0 s tarts the printer (50 microsecond pulse, minimum). bit 1: a 1 causes the printer to line-feed after a line is printed. bit 0: a 0.5 microsecond minimum high active pulse clocks data into the printer. valid data must be present for a minimum of 0.5 microseconds before and after the strobe pulse. 1 1 1 2 3 4 5 6 7 0 strobe auto fd slct in irq enable dir ninit
63 epp address port the address port is available only in epp mode. bit definitions are as follows: 1 2 3 4 5 6 7 0 pd0 pd1 pd2 pd3 pd5 pd4 pd6 pd7 the contents of db0-db7 are buffered (non-inverting) and output to ports pd0-pd7 during a write operation. the leading edge of niow causes an epp address write cycle to be performed, and the trailing edge of niow latches the data for the duration of the epp write cycle. pd0-pd7 ports are read during a read operation. the leading edge of nior causes an epp address read cycle to be performed and the data to be output to the host cpu. epp data port 0-3 these four registers are available only in epp mode. bit definitions of each data port are as follows: 1 2 3 4 5 6 7 0 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 when accesses are made to any epp data port, the contents of db0-db7 are buffered (non-inverting) and output to the ports pd0-pd7 during a write operation. the leading edge of niow causes an epp data write cycle to be performed, and the trailing edge of niow latches the data for the duration of the epp write cycle. during a read operation, ports pd0-pd7 are read, and the leading edge of nior causes an epp read cycle to be performed and the data to be output to the host cpu.
64 bit map of parallel port and epp registers register 7 6 5 4 3 2 1 0 data port (r/w) pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 status buffer (read) nbusy nack pe slct nerror 1 1 tmout control swapper (read) 1 1 1 irqen slin ninit nautofd nstrobe control latch (write) 1 1 dir irq slin ninit nautofd nstrobe epp address port (r/w) pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 epp data port 0 (r/w) pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 epp data port 1 (r/w) pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 epp data port 2 (r/w) pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 epp data port 3 (r/w) pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 epp pin descriptions epp name type epp description nwrite o denotes an address or data read or write operation. pd<0:7> i/o bi-directional epp address and data bus. intr i used by peripheral device to interrupt the host. nwait i inactive to acknowledge that data transfer is completed. active to indicate that the device is ready for the next transfer. pe i paper end; same as spp mode. select i printer selected status; same as spp mode. ndstrb o this signal is active low. it denotes a data read or write operation. nerror i error; same as spp mode. ninits o this signal is active low. when it is active, the epp device is reset to its initial operating mode. nastrb o this signal is active low. it denotes an address read or write operation.
65 epp operation when the epp mode is selected in the configuration register, the standard and bi- directional modes are also available. the pdx bus is in the standard or bi-directional mode when no epp read, write, or address cycle is currently being executed. in this condition all output signals are set by the spp control port and the direction is controlled by dir of the control port. a watchdog timer is required to prevent system lockup. the timer indicates that more than 10 m s have elapsed from the start of the epp cycle to the time nwait is de-asserted. the current epp cycle is aborted when a time-out occurs. the time-out condition is indicated in status bit 0. epp operation the epp operates on a two-phase cycle. first, the host selects the register within the device for subsequent operations. second, the host performs a series of read and/or write byte operations to the selected register. four operations are supported on the epp: address write, data write, address read, and data read. all operations on the epp device are performed synchronously. epp version 1.9 operation the epp read/write operation can be completed under the following conditions: a. if the nwait is active low, when the read cycle (nwrite inactive high, ndstrb/nastrb active low) or write cycle (nwrite active low, ndstrb/nastrb active low) starts, the read/write cycle proceeds normally and will be completed when nwait goes inactive high. b. if nwait is inactive high, the read/write cycle will not start. it must wait until nwait changes to active low, at which time it will start as described above. epp version 1.7 operation the epp read/write cycle can start without checking whether nwait is active or inactive. once the read/write cycle starts, however, it will not terminate until nwait changes from active low to inactive high. extended capabilities parallel (ecp) port this port is software and hardware compatible with existing parallel ports, so it may be used as a standard printer mode if ecp is not required. it provides an automatic high burst-bandwidth channel that supports dma for ecp in both the forward (host to peripheral) and reverse (peripheral to host) directions. small fifos are used in both forward and reverse directions to improve the maximum bandwidth requirement. the size of the fifo is 16 bytes. the ecp port supports an automatic handshake for the standard parallel port to improve compatibility mode transfer speed. the ecp port supports run-length-encoded (rle) decompression (required) in the hardware. compression is accomplished by counting identical bytes and transmitting an rle byte that indicates how many times the next byte is to be repeated. the hardware support for compression is optional. for more information about the ecp protocol, refer to the extended capabilities port protocol and isa interface standard.
66 ecp register and mode definitions name address i/o ecp modes function data base+000h r/w 000-001 data register ecpafifo base+000h r/w 011 ecp fifo (address) dsr base+001h r all status register dcr base+002h r/w all control register cfifo base+400h r/w 010 parallel port data fifo ecpdfifo base+400h r/w 011 ecp fifo (data) tfifo base+400h r/w 110 test fifo cnfga base+400h r 111 configuration register a cnfgb base+401h r/w 111 configuration register b ecr base+402h r/w all extended control register note: the base addresses are specified by cr23, which are determined by configuration register or hardware setting. mode description 000 spp mode 001 ps/2 parallel port mode 010 parallel port data fifo mode 011 ecp parallel port mode 100 epp mode (if this option is enabled in the cr9 and cr0 to select ecp/epp mode) 101 reserved 110 test mode 111 configuration mode note: the mode selection bits are bit 7-5 of the extended control register. data and ecpafifo port modes 000 (spp) and 001 (ps/2) (data port) during a write operation, the data register latches the contents of the data bus on the rising edge of the input. the contents of this register are output to the pd0-pd7 ports. during a read operation, ports pd0-pd7 are read and output to the host. the bit definitions are as follows: 7 6 5 4 3 2 1 0 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7
67 mode 011 (ecp fifo-address/rle) a data byte written to this address is placed in the fifo and tagged as an ecp address/rle. the hardware at the ecp port transmits this byte to the peripheral automatically. the operation of this register is defined only for the forward direction. the bit definitions are as follows: 7 6 5 4 3 2 1 0 address or rle address/rle device status register (dsr) these bits are at low level during a read of the printer status register. the bits of this status register are defined as follows: 7 6 5 4 3 2 1 0 nfault select perror nack nbusy 1 1 1 bit 7: this bit reflects t he complement of the busy input. bit 6: this bit reflects the nack input. bit 5: this bit reflects the perror input. bit 4: this bit reflects the select input. bit 3: this bit reflects the nfault input. bit 2-0: these three bits are not implemente d and are always logic one during a read.
68 device control register (dcr) the bit definitions are as follows: 7 6 5 4 3 2 1 0 1 1 strobe autofd ninit select in direction ackint en bit 6,7: these two bits are logic one during a read and cannot be written. bit 5: this bit has no effect and the direction is always out if mode = 000 or mode = 010. direction is valid in all other modes. 0 the parallel port is in output mode. 1 the parallel port is in input mode. bit 4: interrupt request enable. when this bit is set to a high level, it may be used to enable interrupt requests from the parallel port to the cpu due to a low to high transition on the nack input. bit 3: this bit is inverted and output to the nslin output. 0 the printer is not selected. 1 the printer is selected. bit 2: this bit is output to the ninit output. bit 1: this bit is inverted and output to the nafd output. bit 0: this bit is inverted and output to the nstb output. cfifo (parallel port data fifo) mode = 010 this mode is defined only for the forward direction. the standard parallel port protocol is used by a hardware handshake to the peripheral to transmit bytes written or dmaed from the system to this fifo. transfers to the fifo are byte aligned. ecpdfifo (ecp data fifo) mode = 011 when the direction bit is 0, bytes written or dmaed from the system to this fifo are transmitted by a hardware handshake to the peripheral using the ecp parallel port protocol. transfers to the fifo are byte aligned. when the direction bit is 1, data bytes from the peripheral are read under automatic hardware handshake from ecp into this fifo. reads or dmas from the fifo will return bytes of ecp data to the system.
69 tfifo (test fifo mode) mode = 110 data bytes may be read, written, or dmaed to or from the system to this fifo in any direction. data in the tfifo will not be transmitted to the parallel port lines. however, data in the tfifo may be displayed on the parallel port data lines. cnfga (configuration register a) mode = 111 this register is a read-only register. when it is read, 10h is returned. this indicates to the system that this is an 8-bit implementation. cnfgb (configuration register b) mode = 111 the bit definitions are as follows: 7 6 5 4 3 2 1 0 1 1 1 intrvalue compress irqx 0 irqx 1 irqx 2 bit 7: this bit is read-only. it is at l ow level during a read. this means that this chip does not support hardware rle compression. bit 6: returns the value on the isa irq line to determine possible conflicts. bit 5-3: reflect the irq resource assigned for ecp port. cnfgb[5:3] irq resource 000 reflect other irq resources selected by pnp register (default) 001 irq7 010 irq9 011 irq10 100 irq11 101 irq14 110 irq15 111 irq5 bit 2-0: these five bits are at high level during a read and can be written.
70 ecr (extended control register) mode = all this register controls the extended ecp parallel port functions. the bit definitions are follows: empty full service intr dma en nerrintr en mode mode mode 7 6 5 4 3 2 1 0 bit 7-5: these bits are read/write and select the mode. 000 standard parallel port mode. the fifo is reset in this mode. 001 ps/2 parallel port mode. this is the same as 000 except that direction may be used to tri-state the data lines and reading the data register returns the value on the data lines and not the value in the data register. 010 parallel port fifo mode. this is the same as 000 except that bytes are written or dmaed to the fifo. fifo data are automatically transmitted using the standard parallel port protocol. this mode is useful only when direction is 0. 011 ecp parallel port mode. when the direction is 0 (forward direction), bytes placed into the ecpdfifo and bytes written to the ecpafifo are placed in a single fifo and transmitted automatically to the peripheral using ecp protocol. when the direction is 1 (reverse direction) bytes are moved from the ecp parallel port and packed into bytes in the ecpdfifo. 100 selects epp mode. in this mode, epp is active if the epp supported option is selected. 101 reserved. 110 test mode. the fifo may be written and read in this mode, but the data will not be transmitted on the parallel port. 111 configuration mode. the confga and confgb registers are accessible at 0x400 and 0x401 in this mode. bit 4: read/write (valid only in ecp mode) 1 disables the interrupt generated on the asserting edge of nfault. 0 enables an interrupt pulse on the high to low edge of nfault. if nfault is asserted (interrupt) an interrupt will be generated and this bit is written from a 1 to 0.
71 bit 3: read/write 1 enables dma. 0 disables dma unconditionally. bit 2: read/write 1 disables dma and all of the service interrupts. 0 enables one of the following cases of interrupts. when one of the service interrupts has occurred, the serviceintr bit is set to a 1 by hardware. this bit must be reset to 0 to re-enable the interrupts. writing a 1 to this bit will not cause an interrupt. (a) dmaen = 1: during dma this bit is set to a 1 when terminal count is reached. (b) dmaen = 0 direction = 0: this bit is set to 1 whenever there are writeintr threshold or more bytes free in the fifo. (c) dmaen = 0 direction = 1: this bit is set to 1 whenever there are readintr threshold or more valid bytes to be read from the fifo. bit 1: read only 0 the fifo has at least 1 free byte. 1 the fifo cannot accept another byte or the fifo is completely full. bit 0: read only 0 the fifo contains at least 1 byte of data. 1 the fifo is completely empty. bit map of ecp port registers d7 d6 d5 d4 d3 d2 d1 d0 note data pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 ecpafifo addr/rle address or rle field 2 dsr nbusy nack perror select nfault 1 1 1 1 dcr 1 1 direction ackinten selectin ninit autofd strobe 1 cfifo parallel port data fifo 2 ecpdfifo ecp data fifo 2 tfifo test fifo 2 cnfga 0 0 0 1 0 0 0 0 cnfgb compress intrvalue 1 1 1 1 1 1 ecr mode nerrintren dmaen serviceintr full empty notes: 1. these registers are available in all modes. 2. all fifos use one common 16-byte fifo.
72 ecp pin descriptions name type description nstrobe (hostclk) o the nstrobe registers data or address into the slave on the asserting edge during write operations. this signal handshakes with busy. pd<7:0> i/o these signals contains address or data or rle data. nack (periphclk) i this signal indicates valid data driven by the peripheral when asserted. this signal handshakes with nautofd in reverse. busy (periphack) i this signal desserts to indicate that the peripheral can accept data. it indicates whether the data lines contain ecp command information or data in the reverse direction. when in reverse direction, normal data are transferred when busy (periphack) is high and an 8-bit command is transferred when it is low. perror (nackreverse) i this signal is used to acknowledge a change in the direction of the transfer (asserted = forward). the peripheral drives this signal low to acknowledge nreverserequest. the host relies upon nackreverse to determine when it is permitted to drive the data bus. select (xflag) i indicates printer on line. nautofd (hostack) o requests a byte of data from the peripheral when it is asserted. this signal indicates whether the data lines contain ecp address or data in the forward direction. when in forward direction, normal data are transferred when nautofd (hostack) is high and an 8-bit command is transferred when it is low. nfault (nperiphrequest) i generates an error interrupt when it is asserted. this signal is valid only in the forward direction. the peripheral is permitted (but not required) to drive this pin low to request a reverse transfer during ecp mode. ninit (nreverserequest) o this signal sets the transfer direction (asserted = reverse, deasserted = forward). this pin is driven low to place the channel in the reverse direction. nselectin (ecpmode) o this signal is always deasserted in ecp mode.
73 ecp operation the host must negotiate on the parallel port to determine if the peripheral supports the ecp protocol before ecp operation. after negotiation, it is necessary to initialize some of the port bits. the following are required: - set direction = 0, enabling the drivers. - set strobe = 0, causing the nstrobe signal to default to the deasserted state. - set autofd = 0, causing the nautofd signal to default to the deasserted state. - set mode = 011 (ecp mode) ecp address/rle bytes or data bytes may be sent automatically by writing the ecpafifo or ecpdfifo, respectively. mode switching software will execute p1284 negotiation and all operations prior to a data transfer phase under programmed i/o control (mode 000 or 001). hardware provides an automatic control line handshake, moving data between the fifo and the ecp port only in the data transfer phase (mode 011 or 010). if the port is in mode 000 or 001 it may switch to any other mode. if the port is not in mode 000 or 001 it can only be switched into mode 000 or 001. the direction can be changed only in mode 001. when in extended forward mode, the software should wait for the fifo to be empty before switching back to mode 000 or 001. in ecp reverse mode the software waits for all the data to be read from the fifo before changing back to mode 000 or 001. command/data ecp mode allows the transfer of normal 8-bit data or 8-bit commands. in the forward direction, normal data are transferred when hostack is high and an 8-bit command is transferred when hostack is low. the most significant bits of the command indicate whether it is a run-length count (for compression) or a channel address. in the reverse direction, normal data are transferred when periphack is high and an 8-bit command is transferred when periphack is low. the most significant bit of the command is always zero. data compression the FDC87W22 supports run length encoded (rle) decompression in hardware and can transfer compressed data to a peripheral. note that the odd (rle) compression in hardware is not supported. in order to transfer data in ecp mode, the compression count is written to the ecpafifo and the data byte is written to the ecpdfifo. fifo operation the fifo threshold is set in configuration register 5. all data transfers to or from the parallel port can proceed in dma or programmed i/o (non-dma) mode, as indicated by the selected mode. the fifo is used by selecting the parallel port fifo mode or ecp parallel port mode. after a reset, the fifo is disabled. dma transfers dma transfers are always to or from the ecpdfifo, tfifo, or cfifo. the dma uses the standard pc dma services. the ecp requests dma transfers from the host by activating the pdrq pin. the dma will empty or fill the fifo
74 using the appropriate direction and mode. when the terminal count in the dma controller is reached, an interrupt is generated and serviceintr is asserted, which will disable the dma. programmed i/o (non-dma) mode the ecp or parallel port fifos can also be operated using interrupt driven programmed i/o. programmed i/o transfers are to the ecpdfifo at 400h and ecpafifo at 000h or from the ecpdfifo located at 400h, or to/from the tfifo at 400h. the host must set the direction, state, dmaen = 0 and serviceintr = 0 in the programmed i/o transfers. the ecp requests programmed i/o transfers from the host by activating the irq pin. the programmed i/o will empty or fill the fifo using the appropriate direction and mode. extension fdd mode (extfdd) in this mode, the FDC87W22 changes the printer interface pins to fdc input/output pins, allowing the user to install a second floppy disk drive (fdd b) through the db-25 printer connector. the pin assignments for the fdc input/output pins are shown in table 7a. after the printer interface is set to extfdd mode, the following occur: 1. pins nmob and ndsb will be forced to inactive state. 2. pins, ndskchg, nrdata, nwp, ntrak0, nindex will be logically ored with pins pd4-pd0 to serve as input signals to the fdc. 3. pins pd4-pd0 each will have an internal resistor of about 1k ohm to serve as pull-up resistor for fdd open drain/collector output. 4. if the parallel port is set to extfdd mode after the system has booted dos or another operating system, a warm reset is needed to enable the system to recognize the extension floppy drive. extension 2fdd mode (ext2fdd) in this mode, the FDC87W22 changes the printer interface pins to fdc input/output pins, allowing the user to install two external floppy disk drives through the db-25 printer connector to replace internal floppy disk drives a and b. the pin assignments for the fdc input/output pins are shown in table 7a. after the printer interface is set to extfdd mode, the following occur: 1. pins nmoa, ndsa, nmob, and ndsb will be forced to inactive state. 2. pins ndskchg , nrdata, nwp, ntrak0, and nindex will be logically ored with pins pd4-pd0 to serve as input signals to the fdc. 3. pins pd4-pd0 each will have an internal resistor of about 1k ohm to serve as pull-up resistor for fdd open drain/collector output. 4. if the parallel port is set to ext2fdd mode after the system has booted dos or another operating system, a warm reset is needed to enable the system to recognize the extension floppy drive.
75 extension adapter mode (extadp) (patent pending) in this mode, the FDC87W22 redefines the printer interface pins for use as an extension adapter, allowing a pocket peripheral adapter card to be installed through the db-25 printer connector. the pin assignments for the extension adapter are shown in table 7a. - xdo-xd7 are the system data bus for the extension adapter. - xa0-xa2 are the system address bus. - nxwr and nxrd are the i/o read/write commands with address comparing match or in dma access mode. - nxdack, xtc, and xdrq are used in conjunction with npdackx, tc, and pdrqx to execute a dma cycle. the extension adapter can issue a dma request by setting pin xdrq high, thus sending the FDC87W22 output to the host system by pin pdrqx. the dma controller should recognize the dma request and output a relative dack to pin npdackx of the FDC87W22, which will output the dack without any change from pin nxdack to the extension adapter. once the dma transfer is completed, a terminal count (tc) should be issued from the dma controller to pin tc of FDC87W22 and output to the extension adapter via pin xtc. xirq is the interrupt request of the extension adapter. the value of xirq coming from the extension adapter will directly pass through pin irq7 to the host system. xirq and irq7, nxdack and npdackx, and xdrq and pdrqx are three input/output pairs of FDC87W22 pins. although these pins are defined as dma and interrupt functions, they can be redefined by users for other specific functions. operation the idea behind extadp mode is to treat the parallel port db-25 connector as an isa slot, except that its addresses are not issued to the extension adapter. the operation of extadp mode is described below: 1. set the FDC87W22 to extadp mode by programming bit 7 of cr7 as low and bit 3 and bit 2 of cr0 as high and low, respectively. 2. the FDC87W22 cr2 is an address register that records the address of the extension adapter. when the desired address is written into cr2, pins nxwr and nxrd of the FDC87W22 will simultaneously go low and the desired address will also appear on the printer data bus pd7-pd0. users can logically or these two signals as an initial reset. 3. after the above two steps, every time the host system issues an ior or iow command, the FDC87W22 will compare the i/o address with the cr2 register. if the comparision matches, the data, low bits addresses (xa2-xa0), and nxwr/nxrd will be presented on the parallel port db-25 connector. 4. dma operations are handled in the same way as item 3, except that the relevant npdackx, pdrqx will be active on the db- 25 connector. joystick mode (patent pending) the joystick mode allows users to plug a joystick into the parallel port db-25 connector. the pin definitions are shown in table 7a. - pins nnstb, nafd, nnslin, and ninit output high as a voltage supply to the joystick. - pins pd5 and pd4 are the button input of the joystick. - pins pd1 and pd0 are the x/y axis paddle input of the joystick.
76 - there are two one-shot timers (556) inside the FDC87W22 for use with the joystick. game port decoder the FDC87W22 provides ngmrd and ngmwr pins that decode game port address as specified in cr1e and i/o read/write commands. if the host issues nior and the specified address, the ngmrd pin is low active; if it issues niow and the specified address, the ngmwr pin is low active. plug and play configuration a powerful new plug-and-play function has been built into the FDC87W22 to help simplify the task of setting up a computer environment. with appropriate support from bios manufacturers, the system designer can freely allocate winbond i/o devices (i.e., the fdc, prt, uart, ide, and game port) in the pc's i/o space (100h - 3ffh). in addition, the FDC87W22 also provides 8 interrupt requests and 3 dma pairs for designers to assign in interfacing fdcs, uarts, and prts. hence this powerful i/o chip offers greater flexibility for system designers. the pnp feature is implemented through a set of extended function registers (cr1e and cr20 to 29). details on configuring these registers are given in section 8. the default values of these pnp-related registers set the system to a configuration compatible with environments designed with previous winbond i/o chips. extended function registers the FDC87W22 provides many configuration registers for setting up different types of configurations. after power-on reset, the state of the hardware setting of each pin will be latched by the relevant configuration register to allow the FDC87W22 to enter the proper operating configuration. to protect the chip from invalid reads or writes, the configuration registers cannot be accessed by the user. there are four ways to enable the configuration registers to be read or written. hefere (cr0c bit 5) and hefras (cr16 bit 0) can be used to select one out of these four methods of entering the extended function mode as follows: hefras hefere address and value 0 0 write 88h to the location 250h 0 1 write 89h to the location 250h (power-on default) 1 0 write 86h to the location 3f0h twice 1 1 write 87h to the location 3f0h twice
77 first, a specific value must be written once (88h/89h) or twice (86h/87h) to the extended functions enable register (i/o port address 250h or 3f0h). second, an index value (00h- 17h, 1eh, 20h-29h) must be written to the extended functions index register (i/o port address 251h or 3f0h) to identify which configuration register is to be accessed. the designer can then access the desired configuration register through the extended functions data register (i/o port address 252h or 3f1h). after programming of the configuration register is finished, an additional value should be written to efers to exit the extended function mode to prevent unintentional access to those configuration registers. in the case of efer at 250h, this additional value can be any value other than 88h if hefere = 0 and 89h if hefere = 1. while efer is at 3f0h, this additional value must be aah. the designer can also set bit 6 of cr9 (lockreg) to high to protect the configuration registers against accidental accesses. the configuration registers can be reset to their default or hardware settings only by a cold reset (pin mr = 1). a warm reset will not affect the configuration registers. extended functions enable registers (efers) after a power-on reset, the FDC87W22 enters the default operating mode. before the FDC87W22 enters the extended function mode, a specific value must be programmed into the extended function enable register (efer) so that the extended function register can be accessed. the extended function enable registers are write-only registers. on a pc/at system, their port addresses are 250h or 3f0h (as described in the above section). extended function index registers (efirs), extended function data registers (efdrs) after the extended function mode is entered, the extended function index register (efir) must be loaded with an index value (0h, 1h, 2h, ..., or 29h) to access configuration register 0 (cr0), configuration register 1 (cr1), configuration register 2 (cr2), and so forth through the extended function data register (efdr). the efirs are write-only registers with port address 251h or 3f0h (as described in section 8.0) on pc/at systems; the efdrs are read/write registers with port address 252h or 3f1h (as described in section 8.0) on pc/at systems. the function of each configuration register is described below.
78 configuration register 0 (cr0), default = 00h when the device is in extended function mode and efir is 0h, the cr0 register can be accessed through efdr. the bit definitions for cr0 are as follows: 7 6 5 4 3 2 1 0 ocss0 ocss1 reserved reserved reserved reserved prtmods0 prtmods1 bit 7-bit 4: reserved. prtmod1 prtmod0 (bit 3, bit 2): these two bits and prtmod2 (cr9 bit7) determine the parallel port mode of the FDC87W22. prtmods2 (bit 7 of cr9) prtmod1 (bit 3 of cr0) prtmods0 (bit 2 of cr0) 0 0 1 extfdc 0 1 0 extadp 0 1 1 ext2fdd 1 0 0 joystick 1 0 1 epp/spp 1 1 0 ecp 1 1 1 ecp/epp 01 extension fdd mode (extfdd), prtmod2 = 0 10 extension adapter mode (extadp), prtmod2 = 0 11 extension 2fdd mode (ext2fdd), prtmod2 = 0 00 joystick mode, prtmod2 = 1 01 epp mode and spp mode, prtmod2 = 1 10 ecp mode, prtmod2 = 1 11 ecp mode and epp mode, prtmod2 = 1
79 oscs1, oscs0 (bit 1, bit 0): these two bits and oscs2 (cr6 bit 6) are used to select one of the FDC87W22's power-down functions. these bits may be programmed in four different ways: 00 default power-on state after power-on reset (oscs2 = 0). 00 osc on, 24 mhz clock is stopped internally (oscs2 = 1). clock can be restarted by clearing oscs2. 01 immediate power-down (ipd) state, oscs2 = 0 when bit 0 is 1 and bit 1 is set to 0, the FDC87W22 will stop its oscillator and enter power-down mode immediately. the FDC87W22 will not leave the power-down mode until either a system power-on reset from the mr pin or these two bits are used to program the chip back to power-on state. after leaving the power-down mode, the FDC87W22 must wait 128 ms for the oscillator to stabilize. 10 standby for automatic power-down (apd), oscs2 = 0 when bit 1 is set to 1 and bit 0 is set to 0, the FDC87W22 will stand by for automatic power-down. a power-down will occur when the following conditions obtain: fdc not busy fdd motor off interrupt source of line status, modem status, and data ready is inactive (neg lecting ier enable/disable) master reset inactive souta and soutb in idle state sina and sinb in idle state no register read or write to chip if all of these conditions are met, a counter begins to count down. while the timer is counting down, the FDC87W22 remains in normal operating mode, and if any of the above conditions changes, the counter will be reset. if the set time (set by bit 7 and bit 6 of cr8) elapses without a change in any of the above conditions, bits 1 and 0 will be set to (1, 1) and the chip will enter automatic power-down mode. the oscillator of the FDC87W22 will remain running, but the internal clock will be disabled to save power. once the above conditions are no longer met, the internal clock will be resupplied and the chip will return to normal operation. 11 automatic power-down (adp) state, oscs2 = 0 the FDC87W22 enters this state automatically after the counter described above has counted down. if there is a change in any of the conditions listed above, the FDC87W22 's clock will be restarted and bits 1 and 0 will be set to (1, 0), i.e., standby for automatic power-down. when the clock is restarted, the chip is ready for normal operation, with no need to wait for the oscillator to stabilize.
80 configuration register 1 (cr1), default = 00h when the device is in extended function mode and efir is 01h, the cr1 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 reserved reserved reserved reserved reserved reserved reserved abchg bit 0-bit 6: reserved. abchg (bit 7): this bit enables the fdc ab change mode. default to be enabled at power-on reset. 0 drives a and b assigned as usual 1 drive a and drive b assignments exchanged configuration register 2 (cr2), default = 00h when the device is in extended function mode and efir is 02h, the cr2 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 cea ea3 ea4 ea5 ea6 ea7 ea8 ea9 when the FDC87W22 is programmed into extension adapter mode, the contents of this register are a base address for the extension adapter. when base addresses ea3-ea9 are written into cr2, both the nxrd and nxwr pins will be active low simultaneously and an adapter connected to the parallel port can latch the same base address through pins xd1-xd7. after the base address is latched into cr2, a subsequent read/write cycle to this same base address will generate an nxrd or nxwr signal.
81 if cea is set to 0, then the FDC87W22 will compare system addresses sa9-sa3 with ea9-ea3 to generate a compare-equal signal for this read/write command to access the extension adapter. if cea is set to 1, then only ea9-ea4 are used in this comparison. configuration register 3 (cr3), default = 30h when the device is in extended function mode and efir is 03h, the cr3 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 submidi suamidi reserved reserved gmods eppver gmenl reserved submidi (bit 0): this bit selects the clock divide rate of uartb. 0 disables midi support, uartb clock = 24 mhz divided by 13 (default) 1 enables midi support, uartb clock = 24 mhz divided by 12 suamidi (bit 1): this bit selects the clock divide rate of uarta. 0 disables midi support, uarta clock = 24 mhz divided by 13 (default) 1 enables midi suppo rt, uarta clock = 24 mhz divided by 12 bit 2-bit 3: reserved. gmods (bit 4): this bit selects the adapter mode or portable mode. 0 selects the portable mode. pins 41 and 39 will function as pfdcen and pexten 1 selects the adapter mode. pins 41 and 3 9 will function as ngmrd and ngmwr note: gmdrq (cr16 bit 3) has higher precedence over this bit. that is, gmods selection is only valid when gmgrq = 0.
82 eppver (bit 5): this bit selects the epp version of parallel port: 0 selects the epp 1.9 version 1 selects the epp 1.7 version (default) bit 7-bit 6: reserved. configuration register 4 (cr4), default = 00h when the device is in extended function mode and efir is 04h, the cr4 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 urbtri uratri gmtri prttri urbpwd urapwd gmpwd prtpwd prtpwd (bit 7): 0 supplies power to the parallel port (default) 1 puts the parallel port in power-down mode gmpwd (bit 6): 0 supplies power to the game port (default) 1 puts the game port in power-down mode urapwd (bit 5): 0 supplies power to coma (default) 1 puts coma in power-down mode urbpwd (bit 4): 0 supplies power to comb (default) 1 puts comb in power-down mode prttri (bit 3): this bit enables or disables the tri-state outputs of parallel port in power-down mode. 0 the output pins of the parallel port will not be tri-stated when parallel port is in power-down mode. (default) 1 the output pins of the parallel port will be tri-stated when parallel port is in power- down mode. gmtri (bit 2): this bit enables or disables the tri-state outputs of the game port in power-down mode.
83 0 the output pins of the game port will not be tri-stated when game port is in power- down mode. (default) 1 the output pins of the game port will be tri-stated when game po rt is in power-down mode. uratri (bit 1): this bit enables or disables the tri-state outputs of uarta in power-down mode. 0 the output pins of uarta will not be tri-stated when uarta is in power-down mode. 1 the output pins of uarta will be tri-stated wh en uarta is in power-down mode. urbtri (bit 0): this bit enables or disables the tri-state outputs of uartb in power-down mode. 0 the output pins of uartb will not be tri-stated when uartb is in power-down mode. 1 the output pins of uartb will be tri-sta ted when uartb is in power-down mode. configuration register 5 (cr5), default = 00h when the device is in extended function mode and efir is 05h, the cr5 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 ecpfthr0 ecpfthr1 ecpfthr2 reserved reserved reserved reserved ecpfthr3 bit 7-4: reserved ecpfthr3-0 (bit 3-0): these four bits define the fifo threshold for the ecp mode parallel port. the default value is 0000 after power-up.
84 configuration register 6 (cr6), default = 00h when the device is in extended function mode and efir is 06h, the cr6 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 fdctri idepwd fdcpwd fipurdwm sel4fdd oscs2 reserved idetri bit 7: reserved oscs2 (bit 6): this bit and oscs1, oscs0 (bit 1, 0 of cr0) select one of the FDC87W22's power-down functions. refer to descriptions of cr0. (default to be 0) sel4fdd (bit 5): selects four fdd mode 0 selects two fdd mode (default, see table 9a) 1 selects four fdd mode ndsa, ndsb, nmoa and nmob output pins are encoded as show in table 9b to select f our drives.
85 table 9a do register ( 3f2h ) nmob nmoa ndsb ndsa drive bit 7 bit 6 bit 5 bit 4 bit 1 bit 0 selected 0 0 0 0 0 0 1 1 1 1 -- 0 0 0 1 0 0 1 0 1 0 fdd a 0 0 1 0 0 1 0 1 0 1 fdd b 0 1 0 0 0 1 1 1 1 1 -- 1 0 0 0 1 1 1 1 1 1 -- table 9b do register ( 3f2h ) nmob nmoa ndsb ndsa drive bit 7 bit 6 bit 5 bit 4 bit 1 bit 0 selected 0 0 0 0 x x 1 1 x x -- 0 0 0 1 0 0 0 0 0 0 fdd a 0 0 1 0 0 1 0 0 0 1 fdd b 0 1 0 0 1 0 0 0 1 0 fdd c 1 0 0 0 1 1 0 0 1 1 fdd d fipurdwn (bit 4): this bit controls the internal pull-up resistors of the fdc input pins nrdata, nindex, ntrak0, ndskchg, and nwp. 0 the internal pull-up resistors of fdc are turned on. (default) 1 the internal pull-up resistors of fdc are turned off. fdcpwd (bit 3): this bit controls the power to the fdc. 0 power is supplied to the fdc. (default) 1 puts the fdc in power-down mode. idepwd (bit 2): this bit controls the power of the ide. 0 power is supplied to the ide. (default) 1 puts the ide in powe r-down mode.
86 fdctri (bit 1): this bit enables or disables the tri-state outputs of the fdc in power-down mode. 0 the output pins of the fdc will not be tri-stated when fdc is in power-down mode. 1 the output pins of the fdc will be tri-stated when fdc is in power-down mode. idetri (bit 0): this bit enables or disables the tri-state outputs of the ide in power-down mode. 0 the output pins of the ide will not be tri-stated when ide is in power-down mode. 1 the output pins of the ide will be tri-state d when ide is in power-down mode. configuration register 7 (cr7), default = 00h when the device is in extended function mode and efir is 07h, the cr7 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 fdd a type 0 fdd a type 1 fdd b type 0 fdd b type 1 fdd c type 0 fdd c type 1 fdd d type 0 fdd d type 1 fdd a type 1, 0 (bit 1, 0): these two bits select the type of fdd a. 00 selects normal mode. when nrwc = 0, the data transfer rate is 250 kb/s. when nrwc= 1, the data transfer rate is 500 kb/s. three mode fdd select (en3mode = 1): 01 nrwc= 0, sele cts 1.2 mb high-density fdd. 10 nrwc= 1, selects 1.44 mb high-density fdd. 11 don't care nrwc, selects 720 kb double-density fdd. fdd b type 1, 0 (bit 3, 2): these two bits select the type of fdd b. 00 selects normal mode. when nrwc = 0, the data tra nsfer rate is 250 kb/s. when nrwc= 1, the data transfer rate is 500 kb/s.
87 three mode fdd select (en3mode = 1): 01 nrwc= 0, selects 1.2 mb high-density fdd. 10 nrwc = 1, selects 1.44 mb high-density fdd. 11 don't care nrwc, selects 720 kb double-den sity fdd. fdd c type 1, 0 (bit 5, 4): these two bits select the type of fdd c. 00 selects normal mode. when nrwc = 0, the data transfer rate is 250 kb/s. when nrwc = 1, the data transfer rate is 500 kb/s. three mode fdd select (en 3 mode = 1): 01 nrwc = 0, selects 1.2 mb high-density fdd. 10 nrwc = 1, selects 1.44 mb high-density fdd. 11 don't care nrwc, selects 720 kb double-density fdd. fdd d type 1, 0 (bit 7, 6): these two bits select the type of fdd d. 00 selects normal mode. when nrwc = 0, t he data transfer rate is 250 kb/s. when nrwc = 1, the data transfer rate is 500 kb/s. three mode fdd select (en3mode = 1): 01 nrwc = 0, selects 1.2 mb high-density fdd. 10 nrwc = 1, selects 1.44 mb high-density fdd. 11 don't care nrwc, selects 720 kb double-density fdd. configuration register 8 (cr8), default = 00h when the device is in extended function mode and efir is 08h, the cr8 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 floppy boot drive 0 floppy boot drive 1 media id 0 media id 1 disfddwr apdtms2 apdtms1 swwp
88 apdtms2 apdtms1 (bit 6, 7): these two bits select the count-down time of the automatic power-down mode counter. 00 4 seconds 01 32 seconds 10 64 seconds 11 4 minutes disfddwr (bit 5): this bit enables or disables fdd write data. 0 enables fdd write 1 disables fdd write (forces pins nwe, nwd to stay high) once this bit is set high, the fdc operates normally, but because pin nwe is inactive, the fdd will not write data to diskettes. for example, if a diskette is formatted with disfddwr = 1, after the format command has been executed, messages will be displayed that appear to indicate that the format is complete. if the diskette is removed from the disk drive and inserted again, however, typing the dir command will reveal that the contents of the diskette have not been modified and the diskette was not actually reformatted. this is because as the operating system (e.g., dos) reads the diskette files, it keeps the files in memory. if there is a write operation, dos will write data to the diskette and memory simultaneously. when dos wants to read the diskette, it will first search the files in memory. if dos finds the file in memory, it will not issue a read command to read the diskette. when disfddwr = 1, dos still writes data to the diskette and memory, but only the data in memory are updated. if a read operation is performed, data are read from memory first, and not from the diskette. the action of removing the diskette from the drive and inserting it again forces the ndskchg pin active. dos will then read the contents of the diskette and will show that the contents have not been modified. the same holds true with write commands. the disable fdd write function allows users to protect diskettes against computer viruses by ensuring that no data are written to the diskette. swwp (bit 4): 0 normal, use nwp to determine whether the fdd is write-protected or not 1 fdd is always write-protected media id 1 media id 0 (bit 3, 2): these two bits hold the media id bit 1, 0 for three mode floppy boot drive 1 floppy boot drive 0 (bit 1, 0) these two bits hold the value of floppy boot drive 1 and drive 0 for three mode
89 configuration register 9 (cr9), default = 0ah when the device is in extended function mode and efir is 09h, the cr9 register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 chip id0 chip id1 chip id2 chip id3 reserved lockreg en3mode prtmods2 prtmods2 (bit 7): this bit and prtmods1, prtmods0 (bits 3, 2 of cr0) select the operating mode of the FDC87W22. refer to the descriptions of cr0. lockreg (bit 6): this bit enables or disables the reading and writing of all configuration registers. 0 enables the reading and writing of cr0-cr29 1 disables the reading and writing of cr0-cr29 (locks FDC87W22 extension functions) en3mode (bit 5): this bit enables or disables three mode fdd selection. when this bit is high, it enables the read/write 3f3h register. 0 disables 3 mode fdd selection 1 enables 3 mode fdd selection when three mode fdd function is enabled, the value of nrwc depends on bit 5 and bit 4 of tdr(3f3h). the values of nrwc and their meaning are shown in table 10. table 10 bit 5 of tdr bit 4 of tdr n rwc n rwc = 0 n rwc= 1 0 0 normal 250k bps 500k bps 0 1 0 1.2 m fdd x 1 0 1 x 1.4m fdd 1 1 x x x
90 bit 4: reserved. chip id 3, chip id 2, chip id 1, chip id 0 (bit 3-0): these four bits are read-only bits that contain chip identification information. the value is 0ah for FDC87W22 during a read. configuration register a (cra), default = 1fh when the device is in extended function mode and efir is 0ah, the cra register can be accessed through efdr. the bit definitions are as follows: 7 6 5 4 3 2 1 0 pextecpp pext ecp pext epp pext adp pext act pdcact pdirhop pfdcact pfdcact (bit 7): this bit controls whether pfdcen (pin 41) is active high or low in portable mode. 0 pfdcen is active low 1 pfdcen is active high pextact (bit 6): this bit controls whether pexten (pin 39) is active high or low in portable mode. this pin can also reflect the mode of the parallel port: extadp mode, epp mode, ecp mode, or ecp/epp mode, or any combination of these modes. 0 pexten is active low 1 pexten is active high bit 5: reserved. pdcact (bit 4): this bit controls whether the pdcin pin is active high or low. 0 pdcin is active low 1 pdcin is active high pextadp (bit 3): this bit controls whether the pexten pin is active in extadp mode. 0 pexten is not active in extadp mode 1 pexten is active in extadp mode
91 pextepp (bit 2): this bit controls whether the pexten pin is active in epp mode. 0 pexten is not active in epp mode 1 pexten is active in epp mode pextecp (bit 1): this bit controls whether the pexten pin is active in ecp mode. 0 pexten is not active in ecp mode 1 pexten is active in ecp mode pextecpp (bit 0): this bit controls whether the pexten pin is active in ecp/epp mode. 0 pe xten is not active in ecp/epp mode 1 pexten is active in ecp/epp mode configuration register b (cr0b), default = 0ch when the device is in extended function mode and efir is 0bh, the crb register can be accessed through efdr. the bit definitions are as follows: bit 7-5: these bits are reserved and are logic 0 during a read. enifchg (bit 4): this bit is active high. when active, it enables host interface mode change, which is determined by ident (bit 3) and mfm (bit 2). ident (bit 3): this bit indicates the type of drive being accessed and changes the level on nrwc (pin 87). 0 nrwc will be active low for high data rates (typically used for 3.5" drives) 1 nrwc will be active high for high data rates (typically used for 5.25" drives) when hardware reset or enifchg is a logic 1, ident and mfm select one of three interface modes, as shown in table 11. 1 2 3 4 5 6 7 0 ndrv2en invertz ident enifchg mfm 0 0 0
92 table 11 ident mfm interface 0 0 model 30 mode 0 1 ps/2 mode 1 0 at mode 1 1 at mode mfm (bit 2): this bit and ident select one of the three interface modes (ps/2 mode, model 30, or pc/at mode). intvertz (bit 1): this bit determines the polarity of all fdd interface signals. 0 fdd interface signals are active low 1 fdd interface signals are active high ndrv2en (bit 0): ps/2 mode only when this bit is a logic 0, indicates a second drive is installed and is reflected in status register a. configuration register c (cr0c), default = 28h when the device is in extended function mode and efir is 0ch, the cr0c register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 tx2inv rx2inv reserved urirsel reserved hefere turb tura tura (bit 7): 0 the clock source of uart a is 1.8462 mhz (24 mhz divide 13) (default) 1 the clock source of uart a is 24 mhz, it can make the baudrate of uart a up to 1.5 mhz
93 turb (bit 6): 0 the clock source of uart b is 1.8462 mhz (24 mhz divide 13) (default) 1 the clock source of uart b is 24 mhz, it can make the baudrate of uart a up to 1.5 mhz hefere (bit 5): this bit combines with hefras (cr16 bit 0) to define how to enable extended function registers. hefras hefere address and value 0 0 write 88h to the location 250h 0 1 write 89h to the location 250h (default) 1 0 write 86h to the location 3f0h twice 1 1 write 87h to the location 3f0h twice the default value of hefere is 1. bit 4: reserved. urirsel (bit 3): 0 select uart b as ir function. 1 select uart b as normal function. the default value of urirsel is 1. bit 2: reserved. rx2inv (bit 1): 0 the sinb pin of uart b function or irrx pin of ir function in normal condition. 1 inverse the sinb pin of uart b function or irrx pin of ir function tx2inv (bit 0): 0 the soutb pin of uart b function or irtx pin of ir function in normal condition. 1 inverse the soutb pin of uart b function or ir tx pin of ir function.
94 configuration register d (cr0d), default = a3h when the device is in extended function mode and efir is 0dh, the cr0d register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 sirtx1 sirtx0 sirrx1 sirrx0 hduplx irmode2 irmode1 irmode0 sirtx1 (bit 7): irtx pin selection bit 1 sirtx0 (bit 6): irtx pin selection bit 0 sirtx1 sirtx0 irtx output on pin 0 0 disabled 0 1 irtx1 (pin 43) 1 0 irtx2 (pin 95) 1 1 disabled sirrx1 (bit 5): irrx pin selection bit 1 sirrx0 (bit 4): irrx pin selection bit 0 sirrx1 sirrx0 irrx input on pin 0 0 disabled 0 1 irrx1 (pin 42) 1 0 irrx2 (pin 94) 1 1 disabled hduplx (bit 3): 0 the ir function is full duplex. 1 the ir function is half duplex. irmode2 (bit 2): ir function mode selection bit 2 irmode1 (bit 1): ir function mode selection bit 1
95 irmode0 (bit 0): ir function mode selection bit 0 ir mode ir function irtx irrx 00x disable tri-state high 010* irda active pulse 1.6 m s demodulation into sinb 011* irda active pulse 3/16 bit time demodulation into sinb 100 ask-ir inverting irtx pin routed to sinb 101 ask-ir inverting irtx & 500 khz clock routed to sinb 110 ask-ir inverting irtx demodulation into sinb 111* ask-ir inverting irtx & 500 khz clock demodulation into sinb note: the notation is normal mode in the ir function. the sir schematic diagram for registers crc and crd is shown below.
96 configuration register e (cr0e), configuration register f (cr0f) reserved for testing. should be kept all 0's. 1 0 1 mux 0 1 0 01 00 10 11 11,00 01 10 1 mux 0 1 mux 0 1 0 mux irda mod. 3/16 irda mod. mod1.6u irda irmode0 irmode2 (crd.bit2) urirsel (crc,bit3) transmission time frame 16550a sin uart2 sout rx2inv (crc.bit1) urirsel (crc.bit3) 1 0 mux sirrx1~0 cr0d.bit5,4 ask_ir sin2 irmode1 (crd.bit3) huplx irmode0 (crd.bit0) 500khz mux mux (crd.bit1) irmode2 (crd.bit2) irmode2,1=00 (crd.bit0) disable irtx1 irtx2 sout2 ncs1 irrx1 irrx2 +5v ncs0 +5v sirtx1~0 crd.bit7,6 tx2inv crc.bit0 mux mux ir-da demodulation demodulation (default) (default)
97 configuration register 10 (cr10), default = 00h when the device is in extended function mode and efir is 10h, the cr10 register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 gio0ad7 gio0ad0 gio0ad1 gio0ad2 gio0ad3 gio0ad4 gio0ad5 gio0ad6 gio0ad7-gio0ad0 (bit 7-bit 0): giop0 (pin 92) address bit 7 - bit 0. configuration register 11 (cr11), default = 00h when the device is in extended function mode and efir is 11h, the cr11 register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 g0cadm1 gio0ad8 gio0ad9 gio0ad10 reserved g0cadm0 reserved reserved g0cadm1-g0cadm0 (bit 7-bit 6): giop0 address bit compare mode selection g0cadm1 g0cadm0 giop0 pin 0 0 compare gio0ad10-gio0ad0 with sa10-sa0 0 1 compare gio0ad10-gio0ad1 with sa10-sa1 1 0 compare gio0ad10-gio0ad2 with sa10-sa2 1 1 compare gio0ad10-gio0ad3 with sa10-sa3
98 bit 5-bit 3: reserved gio0ad10-gio0ad8 (bit 2-bit 0): giop0 (pin 92) address bit 10-bit 8 configuration register 12 (cr12), default = 00h when the device is in extended function mode and efir is 12h, the cr12 register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 gio1ad7 gio1ad0 gio1ad1 gio1ad2 gio1ad3 gio1ad4 gio1ad5 gio1ad6 gio1ad7-gio1ad0 (bit 7-bit 0): giop1 (pin 96) address bit 7-bit 0. configuration register 13 (cr13), default = 00h when the device is in extended function mode and efir is 13h, the cr13 register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 g1cadm1 gio1ad8 gio1ad9 gio1ad10 reserved g1cadm0 reserved reserved g1cadm1-g1cadm0 (bit 7-bit 6): giop1 address bit compare mode selection g1cadm1 g1cadm0 giop1 pin 0 0 compare gio1ad10-gio1ad0 with sa10-sa0 0 1 compare gio1ad10-gio1ad1 with sa10-sa1 1 0 compare gio1ad10-gio1ad2 with sa10-sa2 1 1 compare gio1ad10-gio1ad3 with sa10-sa3
99 bit 5- bit 3: reserved gio1ad10-gio1ad8 (bit 2-it 0): giop1 (pin 96) address bit 10-bit 8 configuration register 14 (cr14), default = 00h when the device is in extended function mode and efir is 14h, the cr14 register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 gda0ipi gda0opi gcs0iow gcs0ior gio0csh giop0md0 giop0md1 giop0md2 giop0md2-giop0md0 (bit 7-bit 5): giop0 pin mode selection giop0md2 giop0md1 giop0md0 giop0 pin 0 0 0 0 0 1 inactive (tri-state) as a data output pin (sd0 ? giop0), when (aen = l) and (niow = l) and (sa10-0 = gio0ad10-0), the value of sd0 will be present on giop0 0 1 0 as a data input pin (giop0 ? sd0), when (aen = l) and (nior = l) and (sa10-0 = gio0ad10-0), the value of giop0 will be present on sd0 0 1 1 as a data input/output pin (giop0 ? sd0). when (aen = l) and (niow = l) and (sa10-0 = gio0ad10-0), the value of sd0 will be present on giop0 when (aen = l) and (nior = l) and (sa10-0 = gio0ad10-0), the value of giop0 will be present on sd0 1 x x as a chip select pin, the pin will be active at (aen = l) and (sa10-0 = gio0ad10-0) or (nior = l) or (niow = l)
100 gio0csh(bit 4): 0 the chip select pin will be active low when (aen = l) and (sa10-0 = gio0ad10-0) or (nior = l) or (niow = l) 1 the chip select pin will be active high when (aen = l) and (sa10-0 = gio0ad10-0) or (nior = l) or (niow = l) gcs0ior (bit 3): see below. gcs0iow (bit 2): see below. gcs0ior gcs0iow 0 0 giop0 functions as a chip select pin, and will be active when (aen = l) and (sa10-0 = gio0ad10-0) 0 1 giop0 functions as a chip select pin, and will be active when (aen = l) and (sa10-0 = gio0ad10-0) and (niow = l) 1 0 giop0 functions as a chip select pin, and will be active when (aen = l) and (sa10-0 = gio0ad10-0) and (nior = l) 1 1 giop0 functions as a chip select pin, and will be active when (aen = l) and (sa10-0 = gio0ad10-0) and (niow = l or nior = l) gda0opi (bit 1): see below. gda0ipi (bit 0): see below. gda0opi gda0ipi 0 0 giop0 functions as a data pin, and giop0 ? sd0, sd0 ? giop0 0 1 giop0 functions as a data pin, and inverse giop0 ? sd0, sd0 ? giop0 1 0 giop0 functions as a data pin, and giop0 ? sd0, inverse sd0 ? giop0 1 1 giop0 functions as a data pin, and inverse giop0 ? sd0, inverse sd0 ? giop0
101 configuration register 15 (cr15), default = 00h when the device is in extended function mode and efir is 15h, the cr15 register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 gda0ipi gda0opi gcs0iow gcs0ior gio0csh giop0md0 giop0md1 giop0md2 giop1md2-giop1md0 (bit 7-bit 5): giop1 pin mode selection giop1md2 giop1md1 giop1md0 giop1 pin 0 0 0 inactive (tri-state) 0 0 1 as a data output pin (sd1 ? giop1), when (aen = l) and (niow = l) and (sa10-0 = gio1ad10-0), the value of sd1 will be present on giop1 0 1 0 as a data input pin (giop1 ? sd1), when (aen = l) and (nior = l) and (sa10-0 = gio1ad10-0), the value of giop1 will be present on sd1 0 1 1 as a data input/output pin (giop1 ? sd1). when (aen = l) and (niow = l) and (sa10-0 = gio1ad10-0), the value of sd1 will be present on giop1 when (aen = l) and (nior = l) and (sa10-0 = gio1ad10-0), the value of giop1 will be present on sd1 1 x x as a chip select pin, the pin will be active at (aen = l) and (sa10-0 = gio1ad10-0) or (nior = l) or (niow = l) gio1csh (bit 4): 0 the chip select pin will active low when (aen = l) and (sa10-0 = gioad10-0) or (nior = l) or (niow = l) 1 the chip select pin will active high when (aen = l) and (sa10-0 = gioad10-0) or (nior = l) or (niow = l)
102 gcs1ior (bit 3): see below. gcs1iow (bit 2): see below. gcs1ior gcs1iow 0 0 giop1 functions as a chip select pin, and will be active when (aen = l) and (sa10-0 = gio1ad10-0) 0 1 giop1 functions as a chip select pin, and will be active when (aen = l) and (sa10-0 = gio1ad10-0) and (niow = l) 1 0 giop1 functions as a chip select pin, and will be active when (aen = l) and (sa10-0 = gio1ad10-0) and (nior = l) 1 1 giop1 functions as a chip select pin, and will be active when (aen = l) and (sa10-0 = gio1ad10-0) and (niow = l or nior = l) gda0opi (bit 1): see below. gda1ipi (bit 0): see below. gda1opi gda1ipi 0 0 giop1 functions as a data pin, and giop1 ? sd1, sd1 ? giop1 0 1 giop1 functions as a data pin, and inverse giop1 ? sd1, sd1 ? giop1 1 0 giop1 functions as a data pin, and giop1 ? sd1, inverse sd1 ? giop1 1 1 giop1 functions as a data pin, and inverse giop1 ? sd1, inverse sd1 ? giop1 configuration register 16 (cr16), default = 0eh when the device is in extended function mode and efir is 16h, the cr16 register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 hefras iride pnpcvs gmdrq goiqsel reserved reserved reserved bit 7-bit 5: reserved.
103 goiqsel (bit 4): 0 pins 92, 96 function as irq_b, irq_a, respectively. 1 pins 92, 96 function as gio0, gio1, respectively. the corresponding power-on setting pin is nrtsb (pin 45). gmdrq (bit 3): 0 pins 39, 41 function as drq_a, ndack_a, respectively. 1 pins 39, 41 function as ngmwr, ngmrd, respectively. the corresponding power-on setting pin is soutb (pin 43). pnpcvs (bit 2): 0 pnp-related registers (cr1e, cr20-29) reset to be all 0s. 1 default settings for these registers. the corresponding power-on setting pin is nrtsa (pin 36). pnp register pnpcvs = 1 pnpcvs = 0 cr1e 81h 00h cr20 fch 00h cr21 7ch 00h cr22 fdh 00h cr23 deh 00h cr24 feh 00h cr25 beh 00h cr26 23h 00h cr27 65h 00h cr28 43h 00h cr29 62h 00h note: the new value of pnpcvs must be complementary to the old one to make an effective change. for example, the user must set pnpcvs to 1 first and then reset it to 0 to reset these pnp registers if the present value of pnpcvs is 0. iride (bit 1): 0 pins 1, 91, 94, 95 function as ide ports. 1 pins 1, 91, 94, 95 function as ir ports.
104 the corresponding power-on setting pin is souta (pin 38). pin iride = 0 iride = 1 1 nrstide irq_g 91 nidben irq_h 94 ncs0 irrx2 95 ncs1 irtx2 hefras (bit 0): combines with hefere (cr0c bit 5) to define how to access extended function registers (refer to cr0c bit 5 description). the corresponding power-on setting pin is ndtra (pin 35). configuration register 17 (cr17), default = 00h when the device is in extended function mode and efir is 17h, the cr17 register can be accessed through efdr. the bit definitions are as follows: 1 2 3 4 5 6 7 0 dsublgrq dsualgrq dsprlgrq dsfdlgrq prirqod reserved reserved reserved bit 7-bit 5: reserved. prirqod (bit4): 0 printer irq ports are totem-poles in spp mode and open-drains in ecp/epp mode. 1 printer irq ports are totem-poles in all modes. dsfdlgrq (bit 3): 0 enable fdc legacy mode on irq and drq selections. do register bit 3 has effect on selecting irq. 1 disable fdc legacy mode on irq and drq selections. do register bit 3 has no effect on selecting irq.
105 dsprlgrq (bit 2): 0 enable prt legacy mode on irq and drq selections. dcr bit 4 has effect on selecting irq. 1 disable prt legacy mode on irq and drq selections. dcr bit 4 has no effect on selecting irq. dsualgrq (bit 1): 0 enable uart a legacy mode on irq selection. mcr bit 3 has effect on selecting irq. 1 disable uart a legacy mode on irq selection. mcr bit 3 has no effect on selecting irq. dsublgrq (bit 0): 0 enable uart b legacy mode on irq selection. mcr bit 3 has effect on selecting irq. 1 disable uart b legacy mode on irq selection. mcr bit 3 has no effect on selecting irq.
106 configuration register 1e (cr1e) when the device is in extended function mode and efir is 1eh, the cr1e register can be accessed through efdr. default = 81h if cr16 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 gmas0 gmas1 gmad2 gmad3 gmad4 gmad5 gmad6 gmad7 this register is used to select the base address of game chip select decoder (gamecs) from 100h- 3f0h on 16-byte boundaries. ncs = 0 and a10 = 0 are required to qualify the gamecs output. gmad7-gmad2 (bit 7-bit 2): match a[9:4]. gmas1-gmas0 (bit 1-bit 0): camecs configuration. 00 gamecs disable 01 1-byte decode, a[3:0] = 0001b 10 8-byte decode, a[3:0] = 0xxxb 11 16-byte decode, a[3:0] = xxxxb configuration register 20 (cr20) when the device is in extended function mode and efir is 20h, the cr20 register can be accessed through efdr. default = fch if cr16 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 reserved reserved fdcad2 fdcad3 fdcad4 fdcad5 fdcad6 fdcad7
107 this register is used to select the base address of the floppy disk controller (fdc) from 100h-3f0h on 16-byte boundaries. ncs = 0 and a10 = 0 are required to access the fdc registers. a[3:0] are always decoded as 0xxxb. fdcad7-fdcad2 (bit 7-bit 2): match a[9:4]. bit 7 = 0 and bit 6 = 0 disable this decode. bit 1-bit 0: reserved, fixed at zero. configuration register 21 (cr21) when the device is in extended function mode and efir is 21h, the cr21 register can be accessed through efdr. default = 7ch if cr16 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 reserved reserved ide0ad2 ide0ad3 ide0ad4 ide0ad5 ide0ad6 ide0ad7 this register is used to select the base address of the ide interface control registers from 100h- 3f0h on 16-byte boundaries. ncs = 0 and a10 = 0 are required to access the ide registers. a[3:0] are always decoded as 0xxxb. ide0ad7-ide0ad2 (bit 7-bit 2): match a[9:4]. bit 7 = 0 and bit 6 = 0 disable this decode. bit 1-bit 0: reserved, fixed at zero.
108 configuration register 22 (cr22) when the device is in extended function mode and efir is 22h, the cr22 register can be accessed through efdr. default = fdh if cr16 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 reserved reserved ide1ad2 ide1ad3 ide1ad4 ide1ad5 ide1ad6 ide1ad7 this register is used to select the base address of the ide interface alternate status register from 106h-3f6h on 16-byte boundaries + 6. ncs = 0 and a10 = 0 are required to access the ide alternate status register. a[3:0] must be 0110b. ide1ad7-ide1ad2 (bit 7-bit 2): match a[9:4]. bit 7 = 0 and bit 6 = 0 disable this decode. bit 1: reserved, fixed at zero. bit 0: reserved, fixed at one. configuration register 23 (cr23) when the device is in extended function mode and efir is 23h, the cr23 register can be accessed through efdr. default = deh if cr16 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 prtad0 prtad1 prtad2 prtad3 prtad4 prtad5 prtad6 prtad7
109 this register is used to select the base address of the parallel port. if epp is disable, the parallel port can be set from 100h-3fch on 4-byte boundaries. if epp is enable, the parallel port can be set from 100h-3f8h on 8-byte boundaries. ncs = 0 and a10 = 0 are required to access the parallel port when in compatible, bi-directional, or epp modes. a10 is active in ecp mode. prtad7-prtad0 (bit 7-bit 0): match a[9:2]. bit 7 = 0 and bit 6 = 0 disable this decode. configuration register 24 (cr24) when the device is in extended function mode and efir is 24h, the cr24 register can be accessed through efdr. default = feh if cr16 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 reserved uraad1 uraad2 uraad3 uraad4 uraad5 uraad6 uraad7 this register is used to select the base address of the uart a from 100h-3f8h on 8-byte boundaries. ncs = 0 and a10 = 0 are required to access the uart a registers. a[2:0] are don't-care conditions. uraad7-uraad1 (bit 7-bit 1): match a[9:3]. bit 7 = 0 and bit 6 = 0 disable this decode. bit 0: reserved, fixed at zero.
110 configuration register 25 (cr25) when the device is in extended function mode and efir is 25h, the cr25 register can be accessed through efdr. default = beh if cr16 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 reserved urbad1 urbad2 urbad3 urbad4 urbad5 urbad6 urbad7 this register is used to select the base address of the uart b from 100h-3f8h on 8-byte boundaries. ncs = 0 and a10 = 0 are required to access the uart b registers. a[2:0] are don't-care conditions. urbad7-urbad1 (bit 7-bit 1): match a[9:3]. bit 7 = 0 and bit 6 = 0 disable this decode. bit 0: reserved, fixed at zero. configuration register 26 (cr26) when the device is in extended function mode and efir is 26h, the cr26 register can be accessed through efdr. default = 23h if cr16 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 prtdqs0 prtdqs1 prtdqs2 prtdqs3 fdcdqs0 fdcdqs1 fdcdqs2 fdcdqs3 fdcdqs3-fdcdqs0 (bit 7-bit 4): allocate dma resource for fdc.
111 prtdqs3-prtdqs0 (bit 3-bit 0): allocate dma resource for prt. bit 7- bit4, bit 3 - bit 0 dma selected 0000 none 0001 dma_a 0010 dma_b 0011 dma_c configuration register 27 (cr27) when the device is in extended function mode and efir is 27, the cr27 register can be accessed through efdr. default = 05h if cr6 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 prtiqs0 prtiqs1 prtiqs2 prtiqs3 reserved ecpirqx0 ecpirqx1 ecpirqx2 ecpirqx2-ecpirqx0 (bit7-bit 5): these bits are configurable equivalents to bit[5:3] of cnfgb register in ecp mode except that cnfgb[5:3] are read-only bits. they indicate the irq resource assigned for the ecp printer port. it is the software designer's responsibility to ensure that cr27[7:5] and cr27[3:0] are consistent. for example, cr27[7:5] should be filled with 001 (select irq 7) if cr27[3:0] are to be programmed as 0101 (select irq_e) while irq_e is connected to irq 7. cr27[7:5] irq resource 000 reflect other irq resources selected by cr27[3:0] (default) 001 irq 7 010 irq 9 011 irq 10 100 irq 11 101 irq 14 110 irq 15 111 irq 5 bit 4: reserved.
112 prtiqs3-prtiqs0 (bit 3-bit 0): select irq resource for the parallel port. any unselected irq is in tristate. cr27[3:0] irq selected 0000 none 0001 irq_a 0010 irq_b 0011 irq_c 0100 irq_d 0101 irq_e 0110 irq_f 0111 irq_g 1000 irq_h configuration register 28 (cr28) when the device is in extended function mode and efir is 28, the cr28 register can be accessed through efdr. default = 43h if cr6 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 urbiqs0 urbiqs1 urbiqs2 urbiqs3 uraiqs0 uraiqs1 uraiqs2 uraiqs3 uraiqs3-uraiqs0 (bit 7-bit 4): allocate interrupt resource for uart a. urbiqs3-urbiqs0 (bit 3-bit 0): allocate interrupt resource for uart b.
113 configuration register 29 (cr29) when the device is in extended function mode and efir is 29, the cr29 register can be accessed through efdr. default = 62h if cr6 bit 2 = 1; default = 00h if cr16 bit 2 = 0. the bit definitions are as follows: 1 2 3 4 5 6 7 0 iqniqs0 iqniqs1 iqniqs2 iqniqs3 fdciqs0 fdciqs1 fdciqs2 fdciqs3 fdciqs3-fdciqs0 (bit 7-bit 4): allocate interrupt resource for fdc. iqniqs3-iqniqs0 (bit 3-bit 0): allocate interrupt resource for irqin.
114 table 12 - bit map configuration registers register power-on reset value d7 d6 d5 d4 cr0 0000 0000 0 0 0 0 cr1 0000 0000 abchg 0 0 0 cr2 0000 0000 ra9 ra8 ra7 ra6 cr3 0011 0000 0 gmenl eppver gmods cr4 0000 0000 prtpwd gmpwd urapwd urbpwd cr5 0000 0000 0 0 0 0 cr6 0000 0000 0 oscs2 sel4fdd fipurdwn cr7 0000 0000 fdd d t1 fdd d t0 fdd c t1 fdd c t0 cr8 0000 0000 apdtms1 apdtms0 disfddwr swwp cr9 0000 1010 prtmods2 lockreg en3mode 0 cra 0001 1111 pfdcact pextact pdirhisop pdchact crb 0000 0000 0 0 0 enifchg crc 0010 1000 tura turb hefere 0 crd 1010 0011 sirtx1 sirtx0 sirrx1 sirrx0 cr10 0000 0000 gio0ad7 gio0ad6 gio0ad5 gio0ad4 cr11 0000 0000 0 0 0 0 cr12 0000 0000 gio1ad7 gio1ad6 gio1ad5 gio1ad4 cr13 0000 0000 0 0 0 0 cr14 0000 0000 giop0md2 giop0md1 giop0md0 gio0csh cr15 0000 0000 giop1md2 giop1md1 giop1md0 gio1csh cr16 000s ssss 1 0 0 0 goiqsel cr17 0000 0000 0 0 0 prirqod cr1e 1000 0001 2 gmad7 gmad6 gmad5 gmad4 cr20 1111 1100 2 fdcad7 fdcad6 fdcad5 fdcad4 cr21 0111 1100 2 ide0ad7 ide0ad6 ide0ad5 ide0ad4 cr22 1111 1101 2 ide1ad7 ide1ad6 ide1ad5 ide1ad4 cr23 1101 1110 2 prtad7 prtad6 prtad5 prtad4 cr24 1111 1110 2 uraad7 uraad6 uraad5 uraad4 cr25 1011 1110 2 urbad7 urbad6 urbad5 urbad4 cr26 0010 0011 2 fdcdqs3 fdcdqs2 fdcdqs1 fdcdqs0 cr27 0000 0101 2 ecpirqx2 ecpirqx1 ecpirqx0 0 cr28 0100 0011 2 uraiqs3 uraiqs2 uraiqs1 uraiqs0 cr29 0110 0010 2 fdciqs3 fdciqs2 fdciqs1 fdciqs0 notes: 1. 's' means its value depends on corresponding power-on setting pin. 2. these default values are valid when cr16 bit 2 is 1 during power-on reset; they will be all 0's if cr16 bit 2 is 0.
115 table 12 - bit map configuration registers (continued) register power-on reset value d3 d2 d1 d0 cr0 0000 0000 prtmods1 prtmods0 oscs1 oscs0 cr1 0000 0000 0 0 0 0 cr2 0000 0000 ra5 ra4 ra3 cea cr3 0011 0000 0 0 suamidi submidi cr4 0000 0000 prttri gmtri uratri urbtri cr5 0000 0000 ecpfthr3 ecpfthr2 ecpfthr1 ecpfthr0 cr6 0000 0000 fdcpwd idepwd fdctri idetri cr7 0000 0000 fdd b t1 fdd b t0 fdd a t1 fdd a t0 cr8 0000 0000 media 1 media 0 boot 1 boot 0 cr9 0000 1010 chip id 3 chip id 2 chip id 1 chip id 0 cra 0001 1111 pextadp pextepp pextecp pextecpp crb 0000 0000 ident mfm invertz drv2en crc 0010 1000 urirsel 0 rx2inv tx2inv crd 1010 0011 hduplx irmode2 irmode1 irmode0 cr10 0000 0000 gio0ad3 gio0ad2 gio0ad1 gio0ad0 cr11 0000 0000 0 gio0ad10 gio0ad9 gio0ad8 cr12 0000 0000 gio1ad3 gio1ad2 gio1ad1 gio1ad0 cr13 0000 0000 0 gio1ad10 gio1ad9 gio1ad8 cr14 0000 0000 gcs0ior gcs0iow gda0opi gda0ipi cr15 0000 0000 gcs1ior gcs1iow gda1opi gda1ipi cr16 000s ssss 1 gmdrq pnpcvs iride hefras cr17 0000 0000 dsfdlgrq dsprlgrq dsualgrq dsublgrq cr1e 1000 0001 2 gmad3 gmad2 gmas1 gmas0 cr20 1111 1100 2 fdcad3 fdcad2 0 0 cr21 0111 1100 2 ide0ad3 ide0ad2 0 0 cr22 1111 1101 2 ide1ad3 ide1ad2 0 1 cr23 1101 1110 2 prtad3 prtad2 prtad1 prtad0 cr24 1111 1110 2 uraad3 uraad2 uraad1 0 cr25 1011 1110 2 urbad3 urbad2 urbad1 0 cr26 0010 0011 2 prtdqs3 prtdqs2 prtdqs1 prtdqs0 cr27 0000 0101 2 prtiqs3 prtiqs2 prtiqs1 prtiqs0 cr28 0100 0011 2 urbiqs3 urbiqs2 urbiqs1 urbiqs0 cr29 0110 0010 2 iqniqs3 iqniqs2 iqniqs1 iqniqs0 notes: 1. 's' means its value depends on corresponding power-on setting pin. 2. these default values are valid when cr16 bit 2 is 1 during power-on reset; they will be all 0's if cr16 bit 2 is 0.
116 specifications absolute maximum ratings parameter rating unit power supply voltage -0.5 to 7.0 v input voltage -0.5 to vdd+0.5 v operating temperature 0 to +70 c storage temperature -55 to+ 150 c note: exposure to conditions beyond those listed under absolute maximum ratings may adversely affect the life and reliability of the device. dc characteristics (ta = 0 c to 70 c, vdd = 5v 10%, vss = 0v) parameter sym. min. max. unit conditions i/o 8t - ttl level bi-directional pin with source-sink capabilities of 8 ma input low voltage v il -0.5 0.8 v input high voltage v ih 2.0 v dd + 0.5 v output low voltage v ol 0.4 v i ol = 8 ma output high voltage v oh 2.4 v i oh = -8 ma input high leakage i lih +10 m a v in = v dd input low leakage i lil -10 m a v in = 0v i/o 12t - ttl level bi-directional pin with source-sink capabilities of 12 ma input low voltage v il -0.5 0.8 v input high voltage v ih 2.0 v dd + 0.5 v output low voltage v ol 0.4 v i ol = 12 ma output high voltage v oh 2.4 v i oh = -12 ma input high leakage i lih +10 m a v in = v dd input low leakage i lil -10 m a v in = 0v i/o 24t - ttl level bi-directional pin with source-sink capabilities of 24 ma input low voltage v il -0.5 0.8 v input high voltage v ih 2.0 v dd + 0.5 v output low voltage v ol 0.4 v i ol = 24 ma output high voltage v oh 2.4 v i oh = -24 ma
117 parameter sym. min. max. unit conditions input high leakage i lih +10 m a v in = v dd input low leakage i lil -10 m a v in = 0v out 8t - ttl level output pin with source-sink capabilities of 8 ma output low voltage v ol 0.4 v i ol = 8 ma output high voltage v oh 2.4 v i oh = -8 ma out 12t - ttl level output pin with source-sink capabilities of 12 ma output low voltage v ol 0.4 v i ol = 12 ma output high voltage v oh 2.4 v i oh = -12 ma od 12 - open-drain output pin with sink capabilities of 12 ma output low voltage v ol 0.4 v i ol = 12 ma od 24 - open-drain output pin with sink capabilities of 24 ma output low voltage v ol 0.4 v i ol = 24 ma in t - ttl level input pin input low voltage v il -0.5 0.8 v input high voltage v ih 2.0 v dd + 0.5 v input high leakage i lih +10 m a v in = v dd input low leakage i lil -10 m a v in = 0v in c - cmos level input pin input low voltage v il -0.5 0.3 v dd v input high voltage v ih 0.7 v dd v dd + 0.5 v input high leakage i lih +10 m a v in = v dd input low leakage i lil -10 m a v in = 0v in cs - cmos level schmitt-triggered input pin input low voltage v il -0.5 1.8 v input high voltage v ih 3.0 v dd + 0.5 v input high leakage i lih +10 m a v in = v dd input low leakage i lil -10 m a v in = 0v
118 ac characteristics fdc: data rate = 1 mb/500 kb/300 kb/250 kb/sec. parameter sym. test conditions min. typ. (note 1) max. unit sa9-sa0, aen, ndack, ncs, setup time to nior tar 25 ns sa9-sa0, aen, ndack, hold time for nior tar 0 ns nior width trr 80 ns data access time from nior tfd cl = 100 pf 80 ns data hold from nior tdh cl = 100 pf 10 ns sd to from nior tdf cl = 100 pf 10 50 ns irq delay from nior tri 360/570 /675 ns sa9-sa0, aen, ndack, setup time to niow taw 25 ns sa9-sa0, aen, ndack, hold time for niow twa 0 ns niow width tww 60 ns data setup time to niow tdw 60 ns data hold time from niow twd 0 ns irq delay from niow twi 360/570 /675 ns drq cycle time tmcy 27 m s drq delay time ndack tam 50 ns drq to ndack delay tma 0 ns ndack width taa 260/ 430 /510 ns nior delay from ndrq tmr 0 ns niow delay from ndrq tmw 0 ns
119 parameter sym. test conditions min. typ. (note 1) max. unit niow or nior response time from drq tmrw 6/12 /20/24 m s tc width ttc 135/ 220 /260 ns reset width trst 1.8/3 /3.5 m s nindex width tidx 0.5/ 0.9 /1.0 m s ndir setup time to nstep tdst 1.0/ 1.6 /2.0 m s ndir hold time from nstep tstd 24/ 40/ 48 m s nstep pulse width tstp 6.8/ 11.5 /13.8 7/11.7 /14 7.2/11.9 /14.2 m s nstep cycle width tsc note 2 note 2 note 2 m s nwd pulse width twdd 100/ 185 /225 125/210 /250 150/235 /275 m s write precompensation twpc 100/ 138 /225 125/210 /250 150/235 /275 m s notes: 1. typical values for t = 25 c and normal supply voltage. 2. programmable from 2 ms through 32 ms in 2 ms increments. ide parameter symbol max. unit ncs0, ncs1 delay from sa valid t1 50 ns dbenl, dbenh delay from aen, iocs16, sa t2 50 ns ided7 to d7 delay (read cycle) t4 50 ns d7 to ided7 delay (write cycle) t3 50 ns
120 uart/parallel port parameter symbol test conditions min. max. unit delay from stop to set interrupt tsint 9/16 baud rate delay from nior reset interrupt trint 100 pf loading 1 m s delay from initial irq reset to transmit start tirs 1/16 8/16 baud rate delay from to reset interrupt thr 100 pf loading 175 ns delay from initial niow to interrupt tsi 9/16 16/16 baud rate delay from stop to set interrupt tsti 1/2 baud rate delay from nior to reset interrupt tir 100 pf loading 250 ns delay from niow to output tmwo 100 pf loading 200 ns set interrupt delay from modem input tsim 250 ns reset interrupt delay from nior trim 250 ns interrupt active delay tiad 100 pf loading 25 ns interrupt inactive delay tiid 100 pf loading 30 ns baud divisor n 100 pf loading 2 16 -1 extension adapter mode parameter sym. min. typ. max. unit nxrd, nxwr delay from nior, niow tx1 50 ns xa<0:2> delay from sa<0:2> tx2 50 ns xd<0:7> setup time tx3 50 ns xd<0:7> hold time tx4 0 ns irq & delay from xirq tx5 50 ns drqx delay from xdrq tx6 50 ns nxdack delay from ndackx tx7 50 ns xtc delay from tc tx8 50 ns
121 parallel port mode parameters parameter sym. min. max. unit pd0-7, nindex, nstrobe, nautofd delay from niow t1 100 ns irq delay from nack, nfault t2 60 ns irq delay from niow t3 105 ns irq active low in ecp and epp modes t4 200 300 ns nerror active to irq active t5 105 ns epp data or address read cycle timing parameters parameter sym. min. max. unit ax valid to nior asserted t1 40 ns iochrdy deasserted to nior deasserted t2 0 ns nior deasserted to ax valid t3 10 10 ns nior deasserted to niow or nior asserted t4 40 nior asserted to iochrdy asserted t5 0 24 ns pd valid to sd valid t6 0 75 ns nior deasserted to sd hi-z (hold time) t7 0 40 m s sd valid to iochrdy deasserted t8 0 85 ns nwait deasserted to iochrdy deasserted t9 60 160 ns pd hi-z to pdbir set t10 0 ns nwrite deasserted to nior asserted t13 0 ns nwait asserted to nwrite deasserted t14 0 185 ns nwait deasserted to nwrite modified t15 60 190 ns nior asserted to pd hi-z t16 0 50 ns nwait asserted to pd hi-z t17 60 180 ns command asserted to pd valid t18 0 ns command deasserted to pd hi-z t19 0 ns nwait deasserted to pd drive t20 60 190 ns nwrite deasserted to command t21 1 ns pbdir set to command t22 0 20 ns pd hi-z to command asserted t23 0 30 ns n wait asserted to command asserted t24 0 195 ns nwait deasserted to command deasserted t25 60 180 ns time out t26 10 12 ns pd valid to nwait deasserted t27 0 ns pd hi-z to nwait deasserted t28 0 m s
122 epp data or address write cycle timing parameters parameter sym. min. max. unit ax valid to niow asserted t1 40 ns sd valid to iow asserted t2 10 ns niow deasserted to ax invalid t3 10 ns nwait deasserted to iochrdy deasserted t4 0 ns command asserted to nwait deasserted t5 10 ns niow deasserted to niow or nior asserted t6 40 ns iochrdy deasserted to niow deasserted t7 0 24 ns nwait asserted to command asserted t8 60 160 ns niow asserted to nwait asserted t9 0 70 ns pbdir low to nwrite asserted t10 0 ns nwait asserted to nwrite asserted t11 60 185 ns nwait asserted to nwrite change t12 60 185 ns niow asserted to pd valid t13 0 50 ns nwait asserted to pd invalid t14 0 ns pd invalid to command asserted t15 10 ns niow to command asserted t16 5 35 ns nwait asserted to command asserted t17 60 210 ns nwait deasserted to command deasserted t18 60 190 ns command asserted to nwait deasserted t19 0 10 m s time out t20 10 12 m s command deasserted to nwait asserted t21 0 ns niow deasserted to nwrite deasserted and pd invalid t22 0 ns parallel port fifo timing parameters parameter symbol min. max. unit data valid to nstrobe active t1 600 ns nstrobe active pulse width t2 600 ns data hold from nstrobe inactive t3 450 ns busy inactive to pd inactive t4 80 ns busy inactive to nstrobe active t5 680 ns nstrobe active to busy active t6 500 ns
123 ecp parallel port forward timing parameters parameter symbol min. max. unit nautofd valid to nstrobe asserted t1 0 60 ns pd valid to nstrobe asserted t2 0 60 ns busy deasserted to nautofd changed t3 80 180 ns busy deasserted to pd changed t4 80 180 ns nstrobe deasserted to busy deasserted t5 0 ns busy deasserted to nstrobe asserted t6 80 200 ns nstrobe asserted to busy asserted t7 0 ns busy asserted to nstrobe deasserted t8 80 180 ns ecp parallel port reverse timing parameters parameter symbol min. max. unit pd valid to nack asserted t1 0 ns nautofd deasserted to pd changed t2 0 ns nautofd asserted to nack asserted t3 0 ns nautofd deasserted to nack deasserted t4 0 ns nack deasserted to nautofd asserted t5 80 200 ns pd changed to nautofd deasserted t6 80 200 ns
124 timing waveforms fdc processor read operation nwd write date aen sa0-sa9 ncs twdd tar tdh tdf tra index tidx tidx nindex taw twd twa processor write operation terminal count reset ttc tc trst reset dma operation irq d0 - d7 ndack nior irq d0-d7 aen sa0-sa9 ndack niow drive seek operation step ndir tdst tstp tstd trr tr tfd tsc tmw (niow) tmr (nior) tma tam drq ndack niow or nior tmcy taa tmrw tww twi tdw
125 ide t2 t1 t3 t4 niocs16 sa<0:9> data read ided7 d7 data write ided7 d7 nior niow ndbenh ndbenl ncs1 ncs0
126 uart/parallel trint star data bits (5-8) parity stop tsint star parity data (5-8) stop (1-2) star tir thr tsi thr thrs tsti sin (receiver input data) irq3 or irq4 ior (read receiver buffer register) serial out (sout) iow (write thr) irq3 or irq4 ior (read tir) receiver timing transmitter timing
127 modem control timing nack irq7 nri nior (read msr) niow (write mcr) nrts,ndtr ncts,ndsr ndcd modem control timing x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x tlid tlad printer interrupt timing tsim tmwo tmwo tsim trim trim tsim irq3 or irq4
128 parallel port parallel port timing niow ninit, nstrobe autofd, nslctin nack irq (spp) irq (epp or ecp) nfault (ecp) nerror (ecp) irq t1 t2 t3 t4 t5 t2 t4 pd<0:7>
129 epp data or address read cycle (epp version 1.9) nwrite datastb t13 t16 t14 t17 t22 t18 t23 t24 t21 t25 t19 t15 t20 addrstb nwait t26 t27 t28 pd<0:7> t1 iochrdy t3 t2 t4 t10 ior t5 t6 t7 t8 t9 sd<0:7> a<0:10>
130 epp data or address write cycle (epp version 1.9) t3 naddrstb a10-a0 niow iochrdy nwrite ndatast t1 t2 nwait t4 t5 t6 t20 t19 t7 t9 t10 t11 t13 t15 t16 t17 t22 t8 t18 t21 t12 t14 sd<0:7> pd<0:7> pbdir
131 epp data or address read cycle (epp version 1.7) nwrite datastb t13 t16 t14 t17 t22 t18 t23 t24 t21 t25 t19 t15 t20 addrstb nwait t26 t27 t28 pd<0:7> t1 iochrdy t3 t2 t4 t10 ior t5 t6 t7 t8 t9 sd<0:7> a<0:10>
132 epp data or address write cycle (epp version 1.7) parallel port fifo timing t3 naddrstb a10-a0 iochrdy nwrite ndatast t1 t2 niow nwait t4 t5 t6 t20 t19 t7 t9 t10 t11 t13 t15 t16 t17 t8 t18 t22 t22 sd<0:7> pd<0:7> nstrobe busy > t3 >| >| >| t1 >| t2 t6 >| t5 t4 pd<0:7>
133 ecp parallel port forward timing t3 nautofd t1 t2 nstrobe busy t5 t7 t5 t6 t8 t4 pd<0:7> ecp parallel port reverse timing t1 t5 nack nautofd t3 t6 t4 t5 t2 pd<0:7>
134 extension adapter mode command cycle extension adapter mode interrupt cycle tx3 tx4 tx2 tx1 nior niow nxrd nxwr sa<0:2> xa<0:2> xd<0:7> tx5 xirq irq7
135 extension adapter mode dma cycle tx8 tx7 tx6 xdrq drqx ndackx nxdack tc xtc
136 application circuits parallel port extension fdd 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 printer port 13 25 12 24 11 23 10 22 9 21 8 20 7 19 6 18 5 17 4 16 3 15 2 14 1 jp13 nwe2/slct nwd2/pe nmob2/busy ndsb2/ack pd7 pd6 pd5 ndch2/pd4 rdd2/pd3 nstep2/nslin nwp2/pd2 ndir2/ninit ntrk02/pd1 nhead2/nerr nidx2/pd0 nrwc2/nafd nstb jp 13a ext fdc ndch2 ntrk02 nrdd2 ndir2 nwp2 nmob2 nrwc2 ndsb2 nhead2 nstep2 nwd2 nwe2 nidx2 parallel port extension fdd mode connection diagram
137 parallel port extension 2fdd 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 printer port 13 25 12 24 11 23 10 22 9 21 8 20 7 19 6 18 5 17 4 16 3 15 2 14 1 jp13 nwe2/slct nwd2/pe nmob2/busy ndsb2/ack pd5 ndch2/pd4 nrdd2/pd3 nstep2/nslin nwp2/pd2 ndir2/ninit ntrk02/pd1 nhead2/nerr nidx2/pd0 nrwc2/nafd nstb jp 13a ext fdc ndch2 ntrk02 nrdd2 ndir2 nwp2 nmob2 nrwc2 ndsb2 nhead2 nstep2 nwd2 nwe2 nidx2 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 ndsa2 nmoa2 parallel port extension 2fdd connection diagram ndsa2/pd7 nmoa2/pd6
138 parallel port joystick mode four fdd mode signal joystick 15-pin connector printer port 25-pin connector vdd gnd d0 d1 d2 d3 d4 d5 d6 d7 1,8,9,15 4,5,12 3 6 nc nc 2 7 nc nc 1,14,15,16,17 18~25 2 3 4 5 6 7 8 9 printer port 25-pin connector 13 12 11 10 9 8 7 6 5 4 3 2 1 25 24 23 22 21 20 19 18 17 16 15 14 8 7 6 5 4 3 2 1 15 14 13 12 11 10 9 joystick 15-pin connector parallel port joystick mode connection diagram 81k 81k g1 a1 b1 g2 a2 b2 1y0 1y1 1y2 1y3 2y0 2y1 2y2 2y3 ndsa nmoa ndsa ndsb nmoa nmob FDC87W22 74ls139 7407(2) nmod nmoc nmob ndsc ndsd ndsb
139 package dimensions (100 pin qfp) 51 50 31 30 1 80 81 100 h d d e b e h e 1. dimension d & e do not include interlead flash. 2. dimension b does not include dambar protrusion/intrusion. 3. controlling dimension: millimeters 4. general appearance spec. should be based on final visual inspection spec. 0.10 0 12 0 0.004 3.30 0.10 0.130 0.004 notes: symbol min. nom. max. max. nom. min. dimension in inches dimension in mm 12 2.40 1.40 19.10 1.20 18.80 1.00 18.49 0.094 0.055 0.988 0.752 0.047 0.976 0.740 0.039 0.964 0.728 0.65 20.13 14.13 0.25 0.40 2.97 20.00 14.00 2.85 19.87 13.87 0.10 0.25 2.73 0.792 0.556 0.010 0.016 0.117 0.787 0.551 0.112 0.026 0.782 0.546 0.004 0.010 0.107 0.012 0.006 0.15 0.30 24.49 24.80 25.10 0.020 0.087 0.032 0.103 0.50 0.80 2.21 2.62 a b c d e h d h e l y a a l 1 1 2 e q q 2 1 a y a a seating plane l l 1 see detail f detail f c q q
? 1998 standard microsystems corporation (smsc) circuit diagrams utilizing smsc products are included as a means of illustrating typical applications; consequently complete information sufficient for construction purposes is not necessarily given. the information has been carefully checked and is believed to be entirely reliable. however, no responsibility is assumed for inaccuracies. furthermore, such information does not convey to the purchaser of the semiconduc tor devices described any licenses under the patent rig hts of smsc or others. smsc reserves the right to make changes at any time in order to improve design and supply the best product possible. smsc products are not designed, intended, authorized or warranted for use in any life support or other application where product failure could cause or contribute to personal injury or severe property damage. any and all such uses without prior written approval of an officer of smsc and further testing and/or modification will be fully at the risk of the customer. FDC87W22 rev. 9/11/98


▲Up To Search▲   

 
Price & Availability of FDC87W22

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X